Sha256: a1423944865b95d4b7beec0901e465e1cd4a00d48c360353dc15584eb3490c9c

Contents?: true

Size: 931 Bytes

Versions: 9

Compression:

Stored size: 931 Bytes

Contents

require "application_system_test_case"

class Identity::PasswordResetsTest < ApplicationSystemTestCase
  setup do
    @<%= singular_table_name %> = <%= table_name %>(:lazaro_nixon)
    @sid = @<%= singular_table_name %>.signed_id(purpose: :password_reset, expires_in: 20.minutes)
  end
<% if options.lockable? %>
  teardown { Kredis.clear_all }
<% end -%>

  test "sending a password reset email" do
    visit sign_in_url
    click_on "Forgot your password?"

    fill_in "Email", with: @<%= singular_table_name %>.email
    click_on "Send password reset email"

    assert_text "Check your email for reset instructions"
  end

  test "updating password" do
    visit edit_identity_password_reset_url(token: @sid)

    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 was reset successfully. Please sign in"
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

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