Add test for putting IDs on nav entries

This commit is contained in:
Karina Kwiatek 2023-08-16 21:19:05 +02:00
parent cb89d42813
commit eed4ed5d4b
1 changed files with 7 additions and 0 deletions

View File

@ -42,6 +42,13 @@ describe BootstrapHelper, :type => :helper do
eq('<li class="nav-item "><a class="nav-link" href="/example">Example <span class="badge badge-primary badge-pill">3</span></a></li>')
)
end
it 'should put an ID on the entry an id if given' do
allow(self).to receive(:current_page?).and_return(false)
expect(nav_entry('Example', '/example', id: "testing")).to(
eq('<li class="nav-item " id="testing"><a class="nav-link" href="/example">Example</a></li>')
)
end
end
describe "#list_group_item" do