Sha256: 4ed784c3c656a2a612c3274b85d43eccb5892e4208c3af8faa3ac4abdcbbd144

Contents?: true

Size: 836 Bytes

Versions: 5

Compression:

Stored size: 836 Bytes

Contents

FactoryBot.define do
  factory :access_grant, class: Doorkeeper::AccessGrant do
    sequence(:resource_owner_id) { |n| n }
    application
    redirect_uri { 'https://app.com/callback' }
    expires_in { 100 }
    scopes { 'public write' }
  end

  factory :access_token, class: Doorkeeper::AccessToken do
    sequence(:resource_owner_id) { |n| n }
    application
    expires_in { 2.hours }

    factory :clientless_access_token do
      application { nil }
    end
  end

  factory :application, class: Doorkeeper::Application do
    sequence(:name) { |n| "Application #{n}" }
    redirect_uri { 'https://app.com/callback' }
  end

  # do not name this factory :user, otherwise it will conflict with factories
  # from applications that use doorkeeper factories in their own tests
  factory :doorkeeper_testing_user, class: :user
end

Version data entries

5 entries across 5 versions & 3 rubygems

Version Path
doorkeeper-5.0.3 spec/factories.rb
doorkeeper-5.0.2 spec/factories.rb
doorkeeper-mongodb-5.0.0 spec/factories.rb
doorkeeper-5.0.1 spec/factories.rb
doorkeeper-sequel-2.0.0 spec/factories.rb