about summary refs log tree commit diff
path: root/spec/helpers
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-10-02 12:01:40 +0200
committerGitHub <noreply@github.com>2018-10-02 12:01:40 +0200
commit35e9d099b3febd75d1613dfc8a494e769a98c3a6 (patch)
tree2aceaee757bd292e3d05811673a7bfe419e7b064 /spec/helpers
parent4e60a0d5433f5dfa4f71a452cc5c6ceb0f21ceab (diff)
parent6ad76069096005d7b55d9c63a567f843997a8068 (diff)
Merge pull request #758 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/helpers')
-rw-r--r--spec/helpers/application_helper_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/helpers/application_helper_spec.rb b/spec/helpers/application_helper_spec.rb
index 3ccd96f44..61780b46b 100644
--- a/spec/helpers/application_helper_spec.rb
+++ b/spec/helpers/application_helper_spec.rb
@@ -9,6 +9,14 @@ describe ApplicationHelper do
       expect(result).to eq "active"
     end
 
+    it 'returns active when on a current page' do
+      allow(helper).to receive(:current_page?).with('/foo').and_return(false)
+      allow(helper).to receive(:current_page?).with('/test').and_return(true)
+
+      result = helper.active_nav_class('/foo', '/test')
+      expect(result).to eq "active"
+    end
+
     it 'returns empty string when not on current page' do
       allow(helper).to receive(:current_page?).and_return(false)