]> git.openstreetmap.org Git - rails.git/blob - test/factories/oauth_access_grant.rb
Add user transient attribute to oauth_access_grant factory
[rails.git] / test / factories / oauth_access_grant.rb
1 FactoryBot.define do
2   factory :oauth_access_grant, :class => "Doorkeeper::AccessGrant" do
3     application :factory => :oauth_application
4
5     resource_owner_id { user.id }
6
7     expires_in { 86400 }
8     redirect_uri { application.redirect_uri }
9
10     transient do
11       user { create(:user) } # rubocop:disable FactoryBot/FactoryAssociationWithStrategy
12     end
13   end
14 end