]> git.openstreetmap.org Git - rails.git/blobdiff - test/factories/oauth_access_token.rb
Merge remote-tracking branch 'upstream/pull/5064'
[rails.git] / test / factories / oauth_access_token.rb
index 6a8b62f6c077217548278d3330c6c98c2823abc7..dce8c6520dd3044889d2feac87c94117beb5d38e 100644 (file)
@@ -2,6 +2,10 @@ FactoryBot.define do
   factory :oauth_access_token, :class => "Doorkeeper::AccessToken" do
     application :factory => :oauth_application
 
-    resource_owner_id { create(:user).id }
+    resource_owner_id { user.id }
+
+    transient do
+      user { create(:user) } # rubocop:disable FactoryBot/FactoryAssociationWithStrategy
+    end
   end
 end