X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/12c1d5e6c05813a0697724277b4d8529a1a7c240..d298d1f051317f755b42da869b9e7cd7bade0fc4:/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