Sha256: e15e04e791c17bba7defa13abc08cb8d5baf58ac352934a582b99c5f4cd30a90

Contents?: true

Size: 813 Bytes

Versions: 8

Compression:

Stored size: 813 Bytes

Contents

FactoryGirl.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

8 entries across 8 versions & 2 rubygems

Version Path
doorkeeper-sequel-1.3.1 spec/factories.rb
doorkeeper-sequel-1.3.0 spec/factories.rb
doorkeeper-sequel-1.2.3 spec/factories.rb
doorkeeper-sequel-1.2.2 spec/factories.rb
doorkeeper-4.2.6 spec/factories.rb
doorkeeper-4.2.5 spec/factories.rb
doorkeeper-sequel-1.2.1 spec/factories.rb
doorkeeper-4.2.0 spec/factories.rb