Sha256: 7fe0e52e7cc60f0e0390223365c7e167066301b839b73462952355b3db7035bc

Contents?: true

Size: 873 Bytes

Versions: 19

Compression:

Stored size: 873 Bytes

Contents

# frozen_string_literal: true

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

19 entries across 19 versions & 2 rubygems

Version Path
doorkeeper-5.1.2 spec/factories.rb
doorkeeper-5.2.6 spec/factories.rb
doorkeeper-5.3.3 spec/factories.rb
doorkeeper-5.1.1 spec/factories.rb
doorkeeper-5.2.5 spec/factories.rb
doorkeeper-5.3.2 spec/factories.rb
doorkeeper-sequel-2.2.0 spec/factories.rb
doorkeeper-5.2.4 spec/factories.rb
doorkeeper-5.3.1 spec/factories.rb
doorkeeper-5.3.0 spec/factories.rb
doorkeeper-5.2.3 spec/factories.rb
doorkeeper-5.2.2 spec/factories.rb
doorkeeper-sequel-2.1.0 spec/factories.rb
doorkeeper-5.2.1 spec/factories.rb
doorkeeper-5.2.0 spec/factories.rb
doorkeeper-5.2.0.rc3 spec/factories.rb
doorkeeper-5.2.0.rc2 spec/factories.rb
doorkeeper-5.2.0.rc1 spec/factories.rb
doorkeeper-5.1.0 spec/factories.rb