Sha256: ce3d70b91d354d2f45c7af62be5f14142502147cae9031f60718cc527d161c71

Contents?: true

Size: 771 Bytes

Versions: 8

Compression:

Stored size: 771 Bytes

Contents

require "application_system_test_case"

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

  test "updating the password" do
    click_on "Change password"

    fill_in "Current password", with: "Secret123456"
    fill_in "New password", with: "Secret654321"
    fill_in "Confirm new password", with: "Secret654321"
    click_on "Save changes"

    assert_text "Your password has been changed"
  end

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

    assert_current_path root_path
    return <%= singular_table_name %>
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
authentication-zero-2.4.0 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.3.6 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.3.5 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.3.4 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.3.3 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.3.2 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.3.1 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.3.0 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt