|
|
@ -87,12 +87,12 @@ RSpec.describe "User Features" do |
|
|
|
|
|
|
|
|
|
|
|
it "Can navigate and sign in page with sign in button" do |
|
|
|
it "Can navigate and sign in page with sign in button" do |
|
|
|
visit("/") |
|
|
|
visit("/") |
|
|
|
expect(page).to have_link("Case logs") |
|
|
|
expect(page).to have_link("Sign in") |
|
|
|
click_link("Case logs") |
|
|
|
click_link("Sign in") |
|
|
|
fill_in("user[email]", with: user.email) |
|
|
|
fill_in("user[email]", with: user.email) |
|
|
|
fill_in("user[password]", with: "pAssword1") |
|
|
|
fill_in("user[password]", with: "pAssword1") |
|
|
|
click_button("Sign in") |
|
|
|
click_button("Sign in") |
|
|
|
expect(page).to have_current_path("/case-logs") |
|
|
|
expect(page).to have_current_path("/") |
|
|
|
end |
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
it "tries to access account page, redirects to log in page" do |
|
|
|
it "tries to access account page, redirects to log in page" do |
|
|
|