]> 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 3f862fbca752e9887cbf63df02491ea493c83f10..dce8c6520dd3044889d2feac87c94117beb5d38e 100644 (file)
@@ -1,5 +1,11 @@
 FactoryBot.define do
   factory :oauth_access_token, :class => "Doorkeeper::AccessToken" do
     application :factory => :oauth_application
+
+    resource_owner_id { user.id }
+
+    transient do
+      user { create(:user) } # rubocop:disable FactoryBot/FactoryAssociationWithStrategy
+    end
   end
 end