2019-04-30 08:27:42 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-10-09 21:52:48 +08:00
|
|
|
Fabricator(:user_api_key) do
|
|
|
|
user
|
|
|
|
client_id { SecureRandom.hex }
|
|
|
|
application_name "some app"
|
|
|
|
end
|
|
|
|
|
2020-09-29 17:57:48 +08:00
|
|
|
Fabricator(:user_api_key_scope)
|
|
|
|
|
2016-09-02 14:57:41 +08:00
|
|
|
Fabricator(:readonly_user_api_key, from: :user_api_key) do
|
2020-09-29 17:57:48 +08:00
|
|
|
scopes { [Fabricate.build(:user_api_key_scope, name: "read")] }
|
2016-09-02 14:57:41 +08:00
|
|
|
end
|
2020-10-09 00:38:54 +08:00
|
|
|
|
|
|
|
Fabricator(:bookmarks_calendar_user_api_key, from: :user_api_key) do
|
|
|
|
scopes { [Fabricate.build(:user_api_key_scope, name: "bookmarks_calendar")] }
|
|
|
|
end
|