Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions spec/system/users/forgot_password_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Then I see an invalid credentials message
scenario 'user cannot forgot password if not registered', js: true do
forgot_password('test@example.com')
expect(page).to have_content "Email *\n" + I18n.t('errors.messages.not_found')
expect(page).to have_content "Email *\nnot found"
end

# Scenario: User can forgot password with valid credentials
Expand All @@ -22,7 +22,7 @@
scenario 'user can forgot password with valid credentials', js: true do
user = FactoryBot.create(:user)
forgot_password(user.email)
expect(page).to have_content I18n.t 'devise.passwords.send_instructions'
expect(page).to have_content 'You will receive an email with instructions on how to reset your password in a few minutes.'
end

# Scenario: User cannot forgot password with wrong email
Expand All @@ -32,7 +32,7 @@
# Then I see an invalid email message
scenario 'user cannot forgot password with wrong email', js: true do
forgot_password('invalid@email.com')
expect(page).to have_content "Email *\n" + I18n.t('errors.messages.not_found')
expect(page).to have_content "Email *\nnot found"
end

end
8 changes: 4 additions & 4 deletions spec/system/users/sign_in_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# Then I see an invalid credentials message
scenario 'user cannot sign in if not registered' do
signin('test@example.com', 'please123')
expect(page).to have_content I18n.t 'devise.failure.not_found_in_database', authentication_keys: 'Email'
expect(page).to have_content 'Invalid Email or password.'
end

# Scenario: User can sign in with valid credentials
Expand All @@ -22,7 +22,7 @@
scenario 'user can sign in with valid credentials' do
user = FactoryBot.create(:user)
signin(user.email, user.password)
expect(page).to have_content I18n.t 'devise.sessions.signed_in'
expect(page).to have_content 'Signed in successfully.'
end

# Scenario: User cannot sign in with wrong email
Expand All @@ -33,7 +33,7 @@
scenario 'user cannot sign in with wrong email' do
user = FactoryBot.create(:user)
signin('invalid@email.com', user.password)
expect(page).to have_content I18n.t 'devise.failure.not_found_in_database', authentication_keys: 'Email'
expect(page).to have_content 'Invalid Email or password.'
end

# Scenario: User cannot sign in with wrong password
Expand All @@ -44,7 +44,7 @@
scenario 'user cannot sign in with wrong password' do
user = FactoryBot.create(:user)
signin(user.email, 'invalidpass')
expect(page).to have_content I18n.t 'devise.failure.invalid', authentication_keys: 'Email', normalize_ws: true
expect(page).to have_content 'Invalid Email or password.'
end

# Scenario: Organizer User gets redirected to the events_path
Expand Down
6 changes: 3 additions & 3 deletions spec/system/users/sign_out_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@

user = FactoryBot.create(:user)
signin(user.email, user.password)
expect(page).to have_content I18n.t 'devise.sessions.signed_in'
expect(page).to have_content 'Signed in successfully.'

find('.gravatar-container').click

find('.dropdown-menu').find('a', text: 'Sign Out').click

expect(page).to have_no_content I18n.t('devise.sessions.signed_in')
expect(page).to have_content I18n.t 'devise.sessions.signed_out'
expect(page).to have_no_content 'Signed in successfully.'
expect(page).to have_content 'Signed out successfully.'
end
end
2 changes: 1 addition & 1 deletion spec/system/users/sign_up_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@
scenario 'user can sign up with valid credentials' do
user = build(:user)
sign_up_with(user.email, user.password, user.password)
expect(page).to have_content I18n.t('devise.registrations.signed_up_but_unconfirmed')
expect(page).to have_content 'A message with a confirmation link has been sent to your email address. Please follow the link to activate your account.'
end
end