Skip to content

Commit

Permalink
Merge branch 'test-existing-user-login' into upgrade-rails
Browse files Browse the repository at this point in the history
  • Loading branch information
tsujigiri committed Aug 30, 2024
2 parents 5ca5d93 + 3b3608b commit c4f0602
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions spec/features/login_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,26 @@
end
end
end

context "for existing users" do
let!(:user) do
create(
:user,
email: "[email protected]",
password_salt: "r138v6Tx3iqYNPPdfWnV",
crypted_password: "$2a$10$8kSlpLxvB/psmMrmpIWmYOnM2wu/R8XUn8XvBaCTl6Tcu80LFudLe",
persistence_token: "d078ab6ddb7375ca7fe652b2beef3e2dd2308c5c5a5cec803378436e710e201bc088d3f55f6858c187ed6ba30e7f2282ebb68b1cdddd36c7d8f607f5f178e51a",
perishable_token: "lk8z9uiBMhJWoYx3syIM",
)
end

it "allows them to log in" do
visit(root_path)
click_on("Sign In")
fill_in('Email', with: '[email protected]')
fill_in('Password', with: 'secretly')
click_on('Login')
expect(page).to have_content('Login successful!')
end
end
end

0 comments on commit c4f0602

Please sign in to comment.