Fix #1611 (Rephrase error message for people logging in with an existing user email)

update test to use new rspec syntax
This commit is contained in:
Diogo Matsubara
2017-06-23 08:31:23 -03:00
committed by Maikel Linke
parent 23a6e2dd8f
commit 386d651678
2 changed files with 13 additions and 0 deletions

View File

@@ -60,6 +60,12 @@ en:
spree/order:
payment_state: Payment State
shipment_state: Shipment State
errors:
models:
spree/user:
attributes:
email:
taken: "There's already an account for this email. Please login or reset your password."
devise:
failure:
invalid: |

View File

@@ -60,6 +60,13 @@ feature "Authentication", js: true, retry: 3 do
page.should have_content "too short"
end
scenario "Failing to sign up because email is already registered" do
fill_in "Email", with: user.email
fill_in "Choose a password", with: "foobarino"
click_signup_button
expect(page).to have_content "There's already an account for this email."
end
scenario "Signing up successfully" do
fill_in "Email", with: "test@foo.com"
fill_in "Choose a password", with: "test12345"