Remove unused active_nav_class
helper method (#29617)
This commit is contained in:
parent
d5063072c3
commit
6d2986017e
2 changed files with 0 additions and 28 deletions
|
@ -3,30 +3,6 @@
|
|||
require 'rails_helper'
|
||||
|
||||
describe ApplicationHelper do
|
||||
describe 'active_nav_class' do
|
||||
it 'returns active when on the current page' do
|
||||
allow(helper).to receive(:current_page?).and_return(true)
|
||||
|
||||
result = helper.active_nav_class('/test')
|
||||
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)
|
||||
|
||||
result = helper.active_nav_class('/test')
|
||||
expect(result).to eq ''
|
||||
end
|
||||
end
|
||||
|
||||
describe 'body_classes' do
|
||||
context 'with a body class string from a controller' do
|
||||
before { helper.extend controller_helpers }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue