Sha256: 59a764ecac51f387f10d7ec74c7617b33bc2df463fc56864cd22c6fd6c9a6b19

Contents?: true

Size: 921 Bytes

Versions: 8

Compression:

Stored size: 921 Bytes

Contents

require "application_system_test_case"

class Identity::EmailsTest < ApplicationSystemTestCase
  setup do
    @<%= singular_table_name %> = sign_in_as(<%= table_name %>(:lazaro_nixon))
  end

  test "updating the email" do
    click_on "Change email address"

    fill_in "New email", with: "new_email@hey.com"
    click_on "Save changes"

    assert_text "Your email has been changed"
  end

  test "sending a verification email" do
    @<%= singular_table_name %>.update! verified: false

    click_on "Change email address"
    click_on "Re-send verification email"

    assert_text "We sent a verification email to your email address"
  end

  def sign_in_as(<%= singular_table_name %>)
    visit sign_in_url
    fill_in :email, with: <%= singular_table_name %>.email
    fill_in :password, with: "Secret1*3*5*"
    click_on "Sign in"

    assert_current_path root_url
    return <%= singular_table_name %>
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
authentication-zero-2.9.2 lib/generators/authentication/templates/test_unit/system/identity/emails_test.rb.tt
authentication-zero-2.9.1 lib/generators/authentication/templates/test_unit/system/identity/emails_test.rb.tt
authentication-zero-2.9.0 lib/generators/authentication/templates/test_unit/system/identity/emails_test.rb.tt
authentication-zero-2.8.4 lib/generators/authentication/templates/test_unit/system/identity/emails_test.rb.tt
authentication-zero-2.8.3 lib/generators/authentication/templates/test_unit/system/identity/emails_test.rb.tt
authentication-zero-2.8.2 lib/generators/authentication/templates/test_unit/system/identity/emails_test.rb.tt
authentication-zero-2.8.1 lib/generators/authentication/templates/test_unit/system/identity/emails_test.rb.tt
authentication-zero-2.8.0 lib/generators/authentication/templates/test_unit/system/identity/emails_test.rb.tt