]> git.openstreetmap.org Git - rails.git/blobdiff - test/factories/oauth_access_token.rb
Use shallow routes for diary comments
[rails.git] / test / factories / oauth_access_token.rb
index c0f6245305c57b9018507cf08a8d3a1e19a33ca4..6a8b62f6c077217548278d3330c6c98c2823abc7 100644 (file)
@@ -1,6 +1,7 @@
 FactoryBot.define do
   factory :oauth_access_token, :class => "Doorkeeper::AccessToken" do
-    association :resource_owner_id, :factory => :user
-    association :application, :factory => :oauth_application
+    application :factory => :oauth_application
+
+    resource_owner_id { create(:user).id }
   end
 end