]> git.openstreetmap.org Git - rails.git/blobdiff - test/models/oauth_token_test.rb
Merge remote-tracking branch 'upstream/pull/3936'
[rails.git] / test / models / oauth_token_test.rb
index 3e3aaae7c8738fc80774b8af34163c9a12bbf10e..28f2c34a17343cee7aace42f4a1c6c89cea45f1e 100644 (file)
@@ -7,7 +7,7 @@ class OauthTokenTest < ActiveSupport::TestCase
     tok = OauthToken.new
     assert_not tok.invalidated?, "Token should be created valid."
     tok.invalidate!
     tok = OauthToken.new
     assert_not tok.invalidated?, "Token should be created valid."
     tok.invalidate!
-    assert tok.invalidated?, "Token should now be invalid."
+    assert_predicate tok, :invalidated?, "Token should now be invalid."
   end
 
   ##
   end
 
   ##
@@ -16,7 +16,7 @@ class OauthTokenTest < ActiveSupport::TestCase
     tok = RequestToken.create(:client_application => create(:client_application))
     assert_not tok.authorized?, "Token should be created unauthorised."
     tok.authorize!(create(:user))
     tok = RequestToken.create(:client_application => create(:client_application))
     assert_not tok.authorized?, "Token should be created unauthorised."
     tok.authorize!(create(:user))
-    assert tok.authorized?, "Token should now be authorised."
+    assert_predicate tok, :authorized?, "Token should now be authorised."
     tok.invalidate!
     assert_not tok.authorized?, "Token should now be invalid."
   end
     tok.invalidate!
     assert_not tok.authorized?, "Token should now be invalid."
   end