mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-25 20:46:48 +00:00
- Add `ViewComponent::TestHelpers` to get the helper method `render_inline` - Use Capybara to expect some assertion
9 lines
254 B
Ruby
9 lines
254 B
Ruby
require "spec_helper"
|
|
|
|
describe "ExampleComponent tests", type: :component do
|
|
it "displays the h1 with the given parameter" do
|
|
render_inline(ExampleComponent.new(title: "Hello")) { }
|
|
expect(page).to have_selector "h1", text: "Hello"
|
|
end
|
|
end
|