Unify expectations on spec components folder

In this PR (https://github.com/consul/consul/pull/4683) a new syntax was introduced
in the component specs to check that the component was not rendering.
It seems interesting to add this syntax to the rest of the cases and thus unify the way
we check that a component is not rendering.
This commit is contained in:
taitus
2021-11-03 11:56:36 +01:00
parent 21170d0f24
commit 2b35144540
15 changed files with 22 additions and 27 deletions

View File

@@ -4,13 +4,13 @@ describe Shared::LinkListComponent do
it "renders nothing with an empty list" do
render_inline Shared::LinkListComponent.new
expect(page).not_to have_css "ul"
expect(page.native.inner_html).to be_empty
end
it "returns nothing with a list of nil elements" do
render_inline Shared::LinkListComponent.new(nil, nil)
expect(page).not_to have_css "ul"
expect(page.native.inner_html).to be_empty
end
it "generates a list of links" do