Sha256: 8571d164eaea916ce224a6404f0377aa0c1eecfab2687a50c54ff3a5dfcbec6f

Contents?: true

Size: 634 Bytes

Versions: 29

Compression:

Stored size: 634 Bytes

Contents

require 'test_helper'

module Workarea
  class User
    class PasswordResetTest < TestCase
      def user
        @user ||= create_user
      end

      def test_setup!
        PasswordReset.setup!(user.email)

        assert_equal(1, PasswordReset.count)
        assert_equal(user.id, PasswordReset.first.user_id)
      end

      def test_complete
        reset = PasswordReset.create!(user: user)
        reset.complete('')

        assert(reset.errors[:password].present?)

        reset = PasswordReset.create!(user: user)
        reset.complete('1')

        assert(reset.errors[:password].present?)
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
workarea-core-3.4.20 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.19 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.18 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.17 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.16 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.15 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.14 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.13 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.12 test/models/workarea/user/password_reset_test.rb