Sha256: b58617b0d9052ba3520a3bc35cab15e740158e14a1f716f78f3a75f8bc715e0b

Contents?: true

Size: 770 Bytes

Versions: 8

Compression:

Stored size: 770 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: "Secret1*3*5*"
    fill_in "New password", with: "Secret6*4*2*"
    fill_in "Confirm new password", with: "Secret6*4*2*"
    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: "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/passwords_test.rb.tt
authentication-zero-2.9.1 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.9.0 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.8.4 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.8.3 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.8.2 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.8.1 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt
authentication-zero-2.8.0 lib/generators/authentication/templates/test_unit/system/passwords_test.rb.tt