You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
517 B
20 lines
517 B
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 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
|
|
end
|