]> git.openstreetmap.org Git - rails.git/blobdiff - test/factories/oauth_access_grant.rb
Merge remote-tracking branch 'upstream/pull/5537'
[rails.git] / test / factories / oauth_access_grant.rb
index b9f53890b9afc7876377c6ed2cfdc53dd89b75a5..2a936626768f503cacdb8a10a044b396c1e3e191 100644 (file)
@@ -1,9 +1,14 @@
 FactoryBot.define do
   factory :oauth_access_grant, :class => "Doorkeeper::AccessGrant" do
-    resource_owner_id :factory => :user
     application :factory => :oauth_application
 
+    resource_owner_id { user.id }
+
     expires_in { 86400 }
     redirect_uri { application.redirect_uri }
+
+    transient do
+      user { create(:user) } # rubocop:disable FactoryBot/FactoryAssociationWithStrategy
+    end
   end
 end