X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9018d1af07c53b03bf8caf0480b931dc25f57147..101642af08f7dbf4247394f0799995e486187ddf:/test/factories/oauth_access_token.rb diff --git a/test/factories/oauth_access_token.rb b/test/factories/oauth_access_token.rb index 5b39cb400..dce8c6520 100644 --- a/test/factories/oauth_access_token.rb +++ b/test/factories/oauth_access_token.rb @@ -1,5 +1,11 @@ FactoryBot.define do factory :oauth_access_token, :class => "Doorkeeper::AccessToken" do - association :application, :factory => :oauth_application + application :factory => :oauth_application + + resource_owner_id { user.id } + + transient do + user { create(:user) } # rubocop:disable FactoryBot/FactoryAssociationWithStrategy + end end end