doorkeeper
  • Doorkeeper Guides
  • Ruby on Rails
    • Getting Started
    • Routes
    • Configuration
    • Scopes
    • Securing the API
    • API Mode
    • PKCE Flow
    • Polymorphic Resource Owner
  • Grape
    • Grape
  • ORMs
    • Active Record
    • MongoDB
    • Sequel
    • Couchbase
  • Internals
    • Database Design
    • Internationalization (i18n)
    • Rake
    • Testing
    • Upgrading
    • Creating extensions
  • Security
    • Token and Application Secrets
  • Configuration
    • Models
    • Scopes
    • Skip Authorization
    • Other Configurations
    • Route Constraints and other integrations
Powered by GitBook
On this page

Was this helpful?

  1. Internals

Testing

PreviousRakeNextUpgrading

Last updated 5 years ago

Was this helpful?

You can use Doorkeeper models in your application test suite. Note that starting from Doorkeeper 4.3.0 it uses to load models. There are with the factory_bot_rails gem (it executes factories building before ActiveRecord::Base is initialized using hooks in gem railtie, so you can catch a uninitialized constant error). It is recommended to use pure factory_bot gem to solve this problem.

ActiveSupport lazy loading hooks
known issue