about summary refs log tree commit diff
path: root/spec/fabricators
diff options
context:
space:
mode:
authorEugen Rochko <eugen@zeonfederated.com>2022-09-27 03:08:19 +0200
committerGitHub <noreply@github.com>2022-09-27 03:08:19 +0200
commit5c9abdeff1d0cf3e14d84c5ae298e6a5beccaf18 (patch)
treeb4bad153eec9f2a39d96a9da342e1618ac43740b /spec/fabricators
parent3e0999cd1139d638332d62129dbf0b37263802fd (diff)
Add retention policy for cached content and media (#19232)
Diffstat (limited to 'spec/fabricators')
-rw-r--r--spec/fabricators/access_grant_fabricator.rb6
-rw-r--r--spec/fabricators/preview_card_fabricator.rb1
2 files changed, 7 insertions, 0 deletions
diff --git a/spec/fabricators/access_grant_fabricator.rb b/spec/fabricators/access_grant_fabricator.rb
new file mode 100644
index 000000000..ae1945f2b
--- /dev/null
+++ b/spec/fabricators/access_grant_fabricator.rb
@@ -0,0 +1,6 @@
+Fabricator :access_grant, from: 'Doorkeeper::AccessGrant' do
+  application
+  resource_owner_id { Fabricate(:user).id }
+  expires_in 3_600
+  redirect_uri { Doorkeeper.configuration.native_redirect_uri }
+end
diff --git a/spec/fabricators/preview_card_fabricator.rb b/spec/fabricators/preview_card_fabricator.rb
index f119c117d..99b5edc43 100644
--- a/spec/fabricators/preview_card_fabricator.rb
+++ b/spec/fabricators/preview_card_fabricator.rb
@@ -3,4 +3,5 @@ Fabricator(:preview_card) do
   title { Faker::Lorem.sentence }
   description { Faker::Lorem.paragraph }
   type 'link'
+  image { attachment_fixture('attachment.jpg') }
 end