X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/14936150ac8ab5cb4e8347b772b2c966f2add43f..8cf77a2f360266787360da369fb5d701d83f842f:/test/factories/oauth_access_grant.rb diff --git a/test/factories/oauth_access_grant.rb b/test/factories/oauth_access_grant.rb index b9f53890b..2a9366267 100644 --- a/test/factories/oauth_access_grant.rb +++ b/test/factories/oauth_access_grant.rb @@ -1,9 +1,14 @@ FactoryBot.define do factory :oauth_access_grant, :class => "Doorkeeper::AccessGrant" do - resource_owner_id :factory => :user application :factory => :oauth_application + resource_owner_id { user.id } + expires_in { 86400 } redirect_uri { application.redirect_uri } + + transient do + user { create(:user) } # rubocop:disable FactoryBot/FactoryAssociationWithStrategy + end end end