From 8a6956eb22311cdf78eb32f05210d1c5034b26e1 Mon Sep 17 00:00:00 2001 From: Andy Allan Date: Thu, 9 Mar 2017 11:04:29 +0000 Subject: [PATCH] Use user factory for oauth_token model test. --- test/models/oauth_token_test.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/test/models/oauth_token_test.rb b/test/models/oauth_token_test.rb index c2df0d131..4b0e39e9a 100644 --- a/test/models/oauth_token_test.rb +++ b/test/models/oauth_token_test.rb @@ -1,8 +1,6 @@ require "test_helper" class OauthTokenTest < ActiveSupport::TestCase - api_fixtures - ## # check that after calling invalidate! on a token, it is invalid. def test_token_invalidation @@ -17,7 +15,7 @@ class OauthTokenTest < ActiveSupport::TestCase def test_token_authorisation tok = RequestToken.create(:client_application => create(:client_application)) assert_equal false, tok.authorized?, "Token should be created unauthorised." - tok.authorize!(users(:public_user)) + tok.authorize!(create(:user)) assert_equal true, tok.authorized?, "Token should now be authorised." tok.invalidate! assert_equal false, tok.authorized?, "Token should now be invalid." -- 2.43.2