mirror of
https://framagit.org/tykayn/mastodon.git
synced 2023-08-25 08:33:12 +02:00
ea6c930c04
* Remove unused helper files * Add coverage for application helper * Add coverage for StreamEntriesHelper #display_name
20 lines
517 B
Ruby
20 lines
517 B
Ruby
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
|