mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 07:43:43 +08:00
18 lines
451 B
Ruby
18 lines
451 B
Ruby
# 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
|