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.5.8 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.30 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.7 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.29 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.6 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.28 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.5 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.27 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.4 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.26 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.3 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.25 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.2 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.24 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.1 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.23 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.22 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.0 test/models/workarea/user/password_reset_test.rb
workarea-core-3.4.21 test/models/workarea/user/password_reset_test.rb
workarea-core-3.5.0.beta.1 test/models/workarea/user/password_reset_test.rb