Skip to content

Instantly share code, notes, and snippets.

<!-- layouts/application.html.erb -->
<div data-controller="modal">
<%= link_to "Get Started", new_authentication_path, data-action="modal#show" %>
<div data-target="modal.dialog"></div>
</div>
test “Successful login” do
user = User.create!(name: "name", password: "password")
visit root_path
click_on "Get started"
fill_in :name, with: "name"
fill_in :password, with: "password"
click_on "Log in"
assert_text "Welcome back!"