From 32c53d6d1b71885acbcab7829e197744a357c9fc Mon Sep 17 00:00:00 2001
From: Mike Greiling <mike@pixelcog.com>
Date: Fri, 2 Sep 2016 10:57:22 -0500
Subject: [PATCH] remove dead code - 'collapsed_nav' cookie no longer used
 since a1fbdbb6 (see MR !4579)

---
 app/helpers/nav_helper.rb         | 13 -------------
 app/views/layouts/_page.html.haml |  2 +-
 spec/helpers/nav_helper_spec.rb   | 25 -------------------------
 3 files changed, 1 insertion(+), 39 deletions(-)
 delete mode 100644 spec/helpers/nav_helper_spec.rb

diff --git a/app/helpers/nav_helper.rb b/app/helpers/nav_helper.rb
index 99e39eb442a..df87fac132d 100644
--- a/app/helpers/nav_helper.rb
+++ b/app/helpers/nav_helper.rb
@@ -1,16 +1,4 @@
 module NavHelper
-  def nav_menu_collapsed?
-    cookies[:collapsed_nav] == 'true'
-  end
-
-  def nav_sidebar_class
-    if nav_menu_collapsed?
-      "sidebar-collapsed"
-    else
-      "sidebar-expanded"
-    end
-  end
-
   def page_sidebar_class
     if pinned_nav?
       "page-sidebar-expanded page-sidebar-pinned"
@@ -24,7 +12,6 @@ module NavHelper
       current_path?('merge_requests#builds') ||
       current_path?('merge_requests#conflicts') ||
       current_path?('merge_requests#pipelines') ||
-      
       current_path?('issues#show')
       if cookies[:collapsed_gutter] == 'true'
         "page-gutter right-sidebar-collapsed"
diff --git a/app/views/layouts/_page.html.haml b/app/views/layouts/_page.html.haml
index bf50633af24..4f7839a881f 100644
--- a/app/views/layouts/_page.html.haml
+++ b/app/views/layouts/_page.html.haml
@@ -1,5 +1,5 @@
 .page-with-sidebar{ class: "#{page_sidebar_class} #{page_gutter_class}" }
-  .sidebar-wrapper.nicescroll{ class: nav_sidebar_class }
+  .sidebar-wrapper.nicescroll
     .sidebar-action-buttons
       = link_to '#', class: 'nav-header-btn toggle-nav-collapse', title: "Open/Close" do
         %span.sr-only Toggle navigation
diff --git a/spec/helpers/nav_helper_spec.rb b/spec/helpers/nav_helper_spec.rb
deleted file mode 100644
index e4d18d8bfc6..00000000000
--- a/spec/helpers/nav_helper_spec.rb
+++ /dev/null
@@ -1,25 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the NavHelper. For example:
-#
-# describe NavHelper do
-#   describe "string concat" do
-#     it "concats two strings with spaces" do
-#       expect(helper.concat_strings("this","that")).to eq("this that")
-#     end
-#   end
-# end
-describe NavHelper do
-  describe '#nav_menu_collapsed?' do
-    it 'returns true when the nav is collapsed in the cookie' do
-      helper.request.cookies[:collapsed_nav] = 'true'
-      expect(helper.nav_menu_collapsed?).to eq true
-    end
-
-    it 'returns false when the nav is not collapsed in the cookie' do
-      helper.request.cookies[:collapsed_nav] = 'false'
-      expect(helper.nav_menu_collapsed?).to eq false
-    end
-  end
-end
-- 
2.30.9