Sha256: 41a9ab5ee162aa094ef5b1e073e635e182b6144dc3d5d42f3245030e711a9c9c

Contents?: true

Size: 927 Bytes

Versions: 25

Compression:

Stored size: 927 Bytes

Contents

# Temporary fix until https://github.com/doorkeeper-gem/doorkeeper/pull/1176 merges

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

25 entries across 25 versions & 1 rubygems

Version Path
hackathon_manager-0.14.1 test/factories/temp_doorkeeper.rb
hackathon_manager-0.14.0 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.12 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.11 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.10 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.9 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.8 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.7 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.6 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.5 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.4 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.3 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.2 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.1 test/factories/temp_doorkeeper.rb
hackathon_manager-0.13.0 test/factories/temp_doorkeeper.rb
hackathon_manager-0.12.2 test/factories/temp_doorkeeper.rb
hackathon_manager-0.12.1 test/factories/temp_doorkeeper.rb
hackathon_manager-0.12.0 test/factories/temp_doorkeeper.rb
hackathon_manager-0.11.2 test/factories/temp_doorkeeper.rb
hackathon_manager-0.11.1 test/factories/temp_doorkeeper.rb