Add test for putting IDs on nav entries
This commit is contained in:
parent
cb89d42813
commit
eed4ed5d4b
|
@ -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>')
|
eq('<li class="nav-item "><a class="nav-link" href="/example">Example <span class="badge badge-primary badge-pill">3</span></a></li>')
|
||||||
)
|
)
|
||||||
end
|
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
|
end
|
||||||
|
|
||||||
describe "#list_group_item" do
|
describe "#list_group_item" do
|
||||||
|
|
Loading…
Reference in New Issue