test/unit/reset_password_test.rb in janus-0.9.1 vs test/unit/reset_password_test.rb in janus-0.10.0
- old
+ new
@@ -6,12 +6,12 @@
end
test "generate reset password token" do
assert @user.generate_reset_password_token!
assert @user.persisted?
- assert_not_nil @user.reset_password_token
- assert_not_nil @user.reset_password_sent_at
+ refute_nil @user.reset_password_token
+ refute_nil @user.reset_password_sent_at
end
test "reset password" do
assert @user.generate_reset_password_token!
assert @user.reset_password!('password' => "azerty", 'password_confirmation' => "azerty")
@@ -23,11 +23,11 @@
test "should find user with token" do
@user.generate_reset_password_token!
user = User.find_for_password_reset(@user.reset_password_token)
assert_equal @user, user
- assert_not_nil user.reset_password_token
- assert_not_nil user.reset_password_sent_at
+ refute_nil user.reset_password_token
+ refute_nil user.reset_password_sent_at
end
test "should not find user with bad tokens" do
assert_nil User.find_for_password_reset(nil)
assert_nil User.find_for_password_reset("ariualfknsmgojqm")