Skip to content

Commit c4f0602

Browse files
committed
Merge branch 'test-existing-user-login' into upgrade-rails
2 parents 5ca5d93 + 3b3608b commit c4f0602

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

spec/features/login_spec.rb

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,26 @@
4747
end
4848
end
4949
end
50+
51+
context "for existing users" do
52+
let!(:user) do
53+
create(
54+
:user,
55+
56+
password_salt: "r138v6Tx3iqYNPPdfWnV",
57+
crypted_password: "$2a$10$8kSlpLxvB/psmMrmpIWmYOnM2wu/R8XUn8XvBaCTl6Tcu80LFudLe",
58+
persistence_token: "d078ab6ddb7375ca7fe652b2beef3e2dd2308c5c5a5cec803378436e710e201bc088d3f55f6858c187ed6ba30e7f2282ebb68b1cdddd36c7d8f607f5f178e51a",
59+
perishable_token: "lk8z9uiBMhJWoYx3syIM",
60+
)
61+
end
62+
63+
it "allows them to log in" do
64+
visit(root_path)
65+
click_on("Sign In")
66+
fill_in('Email', with: '[email protected]')
67+
fill_in('Password', with: 'secretly')
68+
click_on('Login')
69+
expect(page).to have_content('Login successful!')
70+
end
71+
end
5072
end

0 commit comments

Comments
 (0)