discourse/spec/fabricators/user_api_key_fabricator.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

18 lines
451 B
Ruby
Raw Normal View History

# frozen_string_literal: true
Fabricator(:user_api_key) do
user
client_id { SecureRandom.hex }
application_name 'some app'
end
Fabricator(:user_api_key_scope)
Fabricator(:readonly_user_api_key, from: :user_api_key) do
scopes { [Fabricate.build(:user_api_key_scope, name: 'read')] }
end
Fabricator(:bookmarks_calendar_user_api_key, from: :user_api_key) do
scopes { [Fabricate.build(:user_api_key_scope, name: 'bookmarks_calendar')] }
end