X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9018d1af07c53b03bf8caf0480b931dc25f57147..560146d88c0c8a49d723d63ce79a382b90431133:/test/factories/oauth_access_token.rb?ds=sidebyside 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