about summary refs log tree commit diff
path: root/spec/fabricators
diff options
context:
space:
mode:
Diffstat (limited to 'spec/fabricators')
-rw-r--r--spec/fabricators/access_grant_fabricator.rb2
-rw-r--r--spec/fabricators/access_token_fabricator.rb2
-rw-r--r--spec/fabricators/accessible_access_token_fabricator.rb2
-rw-r--r--spec/fabricators/account_alias_fabricator.rb5
-rw-r--r--spec/fabricators/account_deletion_request_fabricator.rb3
-rw-r--r--spec/fabricators/account_domain_block_fabricator.rb2
-rw-r--r--spec/fabricators/account_fabricator.rb2
-rw-r--r--spec/fabricators/account_migration_fabricator.rb3
-rw-r--r--spec/fabricators/account_moderation_note_fabricator.rb7
-rw-r--r--spec/fabricators/account_note_fabricator.rb4
-rw-r--r--spec/fabricators/account_pin_fabricator.rb7
-rw-r--r--spec/fabricators/account_stat_fabricator.rb10
-rw-r--r--spec/fabricators/account_statuses_cleanup_policy_fabricator.rb2
-rw-r--r--spec/fabricators/account_tag_stat_fabricator.rb3
-rw-r--r--spec/fabricators/account_warning_fabricator.rb2
-rw-r--r--spec/fabricators/account_warning_preset_fabricator.rb4
-rw-r--r--spec/fabricators/admin_action_log_fabricator.rb6
-rw-r--r--spec/fabricators/announcement_fabricator.rb2
-rw-r--r--spec/fabricators/announcement_mute_fabricator.rb4
-rw-r--r--spec/fabricators/announcement_reaction_fabricator.rb5
-rw-r--r--spec/fabricators/appeal_fabricator.rb2
-rw-r--r--spec/fabricators/application_fabricator.rb2
-rw-r--r--spec/fabricators/backup_fabricator.rb2
-rw-r--r--spec/fabricators/block_fabricator.rb2
-rw-r--r--spec/fabricators/bookmark_fabricator.rb2
-rw-r--r--spec/fabricators/canonical_email_block_fabricator.rb4
-rw-r--r--spec/fabricators/conversation_account_fabricator.rb6
-rw-r--r--spec/fabricators/conversation_fabricator.rb2
-rw-r--r--spec/fabricators/conversation_mute_fabricator.rb2
-rw-r--r--spec/fabricators/custom_emoji_category_fabricator.rb3
-rw-r--r--spec/fabricators/custom_emoji_fabricator.rb4
-rw-r--r--spec/fabricators/custom_filter_fabricator.rb2
-rw-r--r--spec/fabricators/custom_filter_keyword_fabricator.rb4
-rw-r--r--spec/fabricators/custom_filter_status_fabricator.rb2
-rw-r--r--spec/fabricators/device_fabricator.rb2
-rw-r--r--spec/fabricators/domain_allow_fabricator.rb4
-rw-r--r--spec/fabricators/domain_block_fabricator.rb2
-rw-r--r--spec/fabricators/email_domain_block_fabricator.rb2
-rw-r--r--spec/fabricators/encrypted_message_fabricator.rb9
-rw-r--r--spec/fabricators/favourite_fabricator.rb2
-rw-r--r--spec/fabricators/featured_tag_fabricator.rb6
-rw-r--r--spec/fabricators/follow_fabricator.rb2
-rw-r--r--spec/fabricators/follow_recommendation_suppression_fabricator.rb3
-rw-r--r--spec/fabricators/follow_request_fabricator.rb2
-rw-r--r--spec/fabricators/identity_fabricator.rb8
-rw-r--r--spec/fabricators/import_fabricator.rb2
-rw-r--r--spec/fabricators/invite_fabricator.rb2
-rw-r--r--spec/fabricators/ip_block_fabricator.rb6
-rw-r--r--spec/fabricators/list_account_fabricator.rb8
-rw-r--r--spec/fabricators/list_fabricator.rb4
-rw-r--r--spec/fabricators/login_activity_fabricator.rb2
-rw-r--r--spec/fabricators/marker_fabricator.rb2
-rw-r--r--spec/fabricators/media_attachment_fabricator.rb2
-rw-r--r--spec/fabricators/mention_fabricator.rb2
-rw-r--r--spec/fabricators/mute_fabricator.rb2
-rw-r--r--spec/fabricators/notification_fabricator.rb2
-rw-r--r--spec/fabricators/one_time_key_fabricator.rb4
-rw-r--r--spec/fabricators/poll_fabricator.rb2
-rw-r--r--spec/fabricators/poll_vote_fabricator.rb4
-rw-r--r--spec/fabricators/preview_card_fabricator.rb2
-rw-r--r--spec/fabricators/preview_card_provider_fabricator.rb5
-rw-r--r--spec/fabricators/relay_fabricator.rb4
-rw-r--r--spec/fabricators/report_fabricator.rb4
-rw-r--r--spec/fabricators/report_note_fabricator.rb4
-rw-r--r--spec/fabricators/rule_fabricator.rb2
-rw-r--r--spec/fabricators/scheduled_status_fabricator.rb2
-rw-r--r--spec/fabricators/session_activation_fabricator.rb4
-rw-r--r--spec/fabricators/setting_fabricator.rb1
-rw-r--r--spec/fabricators/site_upload_fabricator.rb5
-rw-r--r--spec/fabricators/status_edit_fabricator.rb7
-rw-r--r--spec/fabricators/status_fabricator.rb4
-rw-r--r--spec/fabricators/status_pin_fabricator.rb2
-rw-r--r--spec/fabricators/status_stat_fabricator.rb6
-rw-r--r--spec/fabricators/system_key_fabricator.rb3
-rw-r--r--spec/fabricators/tag_fabricator.rb2
-rw-r--r--spec/fabricators/tag_follow_fabricator.rb2
-rw-r--r--spec/fabricators/unavailable_domain_fabricator.rb4
-rw-r--r--spec/fabricators/user_fabricator.rb7
-rw-r--r--spec/fabricators/user_invite_request_fabricator.rb4
-rw-r--r--spec/fabricators/user_role_fabricator.rb10
-rw-r--r--spec/fabricators/web_push_subscription_fabricator.rb2
-rw-r--r--spec/fabricators/web_setting_fabricator.rb2
-rw-r--r--spec/fabricators/webauthn_credential_fabricator.rb2
-rw-r--r--spec/fabricators/webhook_fabricator.rb2
84 files changed, 183 insertions, 111 deletions
diff --git a/spec/fabricators/access_grant_fabricator.rb b/spec/fabricators/access_grant_fabricator.rb
index ae1945f2b..adc2b8369 100644
--- a/spec/fabricators/access_grant_fabricator.rb
+++ b/spec/fabricators/access_grant_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator :access_grant, from: 'Doorkeeper::AccessGrant' do
   application
   resource_owner_id { Fabricate(:user).id }
diff --git a/spec/fabricators/access_token_fabricator.rb b/spec/fabricators/access_token_fabricator.rb
index 1856a8eb3..508c32808 100644
--- a/spec/fabricators/access_token_fabricator.rb
+++ b/spec/fabricators/access_token_fabricator.rb
@@ -1,2 +1,4 @@
+# frozen_string_literal: true
+
 Fabricator :access_token, from: 'Doorkeeper::AccessToken' do
 end
diff --git a/spec/fabricators/accessible_access_token_fabricator.rb b/spec/fabricators/accessible_access_token_fabricator.rb
index 4b7e99b20..fb3d0889b 100644
--- a/spec/fabricators/accessible_access_token_fabricator.rb
+++ b/spec/fabricators/accessible_access_token_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator :accessible_access_token, from: :access_token do
   expires_in { nil }
   revoked_at { nil }
diff --git a/spec/fabricators/account_alias_fabricator.rb b/spec/fabricators/account_alias_fabricator.rb
deleted file mode 100644
index 94dde9bb8..000000000
--- a/spec/fabricators/account_alias_fabricator.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-Fabricator(:account_alias) do
-  account
-  acct 'test@example.com'
-  uri 'https://example.com/users/test'
-end
diff --git a/spec/fabricators/account_deletion_request_fabricator.rb b/spec/fabricators/account_deletion_request_fabricator.rb
deleted file mode 100644
index 08a82ba3c..000000000
--- a/spec/fabricators/account_deletion_request_fabricator.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-Fabricator(:account_deletion_request) do
-  account
-end
diff --git a/spec/fabricators/account_domain_block_fabricator.rb b/spec/fabricators/account_domain_block_fabricator.rb
index 2ad4b67a9..ff85e17f3 100644
--- a/spec/fabricators/account_domain_block_fabricator.rb
+++ b/spec/fabricators/account_domain_block_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:account_domain_block) do
   account
   domain 'example.com'
diff --git a/spec/fabricators/account_fabricator.rb b/spec/fabricators/account_fabricator.rb
index 205706532..6ffbba584 100644
--- a/spec/fabricators/account_fabricator.rb
+++ b/spec/fabricators/account_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 keypair     = OpenSSL::PKey::RSA.new(2048)
 public_key  = keypair.public_key.to_pem
 private_key = keypair.to_pem
diff --git a/spec/fabricators/account_migration_fabricator.rb b/spec/fabricators/account_migration_fabricator.rb
index 2a8e747a8..ae6143a65 100644
--- a/spec/fabricators/account_migration_fabricator.rb
+++ b/spec/fabricators/account_migration_fabricator.rb
@@ -1,6 +1,9 @@
+# frozen_string_literal: true
+
 Fabricator(:account_migration) do
   account
   target_account { |attrs| Fabricate(:account, also_known_as: [ActivityPub::TagManager.instance.uri_for(attrs[:account])]) }
   acct           { |attrs| attrs[:target_account].acct }
   followers_count 1234
+  created_at { 60.days.ago }
 end
diff --git a/spec/fabricators/account_moderation_note_fabricator.rb b/spec/fabricators/account_moderation_note_fabricator.rb
index 9277af165..341a24dea 100644
--- a/spec/fabricators/account_moderation_note_fabricator.rb
+++ b/spec/fabricators/account_moderation_note_fabricator.rb
@@ -1,4 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:account_moderation_note) do
-  content "MyText"
-  account nil
+  content 'MyText'
+  account
+  target_account { Fabricate(:account) }
 end
diff --git a/spec/fabricators/account_note_fabricator.rb b/spec/fabricators/account_note_fabricator.rb
index 1b061745a..bb4ed8b24 100644
--- a/spec/fabricators/account_note_fabricator.rb
+++ b/spec/fabricators/account_note_fabricator.rb
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:account_note) do
   account
   target_account { Fabricate(:account) }
-  comment        "User note text"
+  comment        'User note text'
 end
diff --git a/spec/fabricators/account_pin_fabricator.rb b/spec/fabricators/account_pin_fabricator.rb
index c0f8b8afb..32a5f3bdb 100644
--- a/spec/fabricators/account_pin_fabricator.rb
+++ b/spec/fabricators/account_pin_fabricator.rb
@@ -1,4 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:account_pin) do
-  account        nil
-  target_account nil
+  account
+  target_account(fabricator: :account)
+  before_create { |account_pin, _| account_pin.account.follow!(account_pin.target_account) }
 end
diff --git a/spec/fabricators/account_stat_fabricator.rb b/spec/fabricators/account_stat_fabricator.rb
index 2b06b4790..e6085c5f2 100644
--- a/spec/fabricators/account_stat_fabricator.rb
+++ b/spec/fabricators/account_stat_fabricator.rb
@@ -1,6 +1,8 @@
+# frozen_string_literal: true
+
 Fabricator(:account_stat) do
-  account         nil
-  statuses_count  ""
-  following_count ""
-  followers_count ""
+  account
+  statuses_count  '123'
+  following_count '456'
+  followers_count '789'
 end
diff --git a/spec/fabricators/account_statuses_cleanup_policy_fabricator.rb b/spec/fabricators/account_statuses_cleanup_policy_fabricator.rb
index 29cf1d133..0e756ddba 100644
--- a/spec/fabricators/account_statuses_cleanup_policy_fabricator.rb
+++ b/spec/fabricators/account_statuses_cleanup_policy_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:account_statuses_cleanup_policy) do
   account
 end
diff --git a/spec/fabricators/account_tag_stat_fabricator.rb b/spec/fabricators/account_tag_stat_fabricator.rb
deleted file mode 100644
index 9edb550be..000000000
--- a/spec/fabricators/account_tag_stat_fabricator.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-Fabricator(:account_tag_stat) do
-  accounts_count ""
-end
diff --git a/spec/fabricators/account_warning_fabricator.rb b/spec/fabricators/account_warning_fabricator.rb
index 72fe835d9..e5059e37f 100644
--- a/spec/fabricators/account_warning_fabricator.rb
+++ b/spec/fabricators/account_warning_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:account_warning) do
   account
   target_account(fabricator: :account)
diff --git a/spec/fabricators/account_warning_preset_fabricator.rb b/spec/fabricators/account_warning_preset_fabricator.rb
index 6c0b87e7c..c50e08bf4 100644
--- a/spec/fabricators/account_warning_preset_fabricator.rb
+++ b/spec/fabricators/account_warning_preset_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:account_warning_preset) do
-  text "MyText"
+  text { Faker::Lorem.paragraph }
 end
diff --git a/spec/fabricators/admin_action_log_fabricator.rb b/spec/fabricators/admin_action_log_fabricator.rb
index 2f44e953d..a259644bd 100644
--- a/spec/fabricators/admin_action_log_fabricator.rb
+++ b/spec/fabricators/admin_action_log_fabricator.rb
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator('Admin::ActionLog') do
-  account nil
-  action  "MyString"
+  account
+  action  'MyString'
   target  nil
 end
diff --git a/spec/fabricators/announcement_fabricator.rb b/spec/fabricators/announcement_fabricator.rb
index 5a3871d90..5d7736587 100644
--- a/spec/fabricators/announcement_fabricator.rb
+++ b/spec/fabricators/announcement_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:announcement) do
   text      { Faker::Lorem.paragraph(sentence_count: 2) }
   published true
diff --git a/spec/fabricators/announcement_mute_fabricator.rb b/spec/fabricators/announcement_mute_fabricator.rb
deleted file mode 100644
index c4eafe8f4..000000000
--- a/spec/fabricators/announcement_mute_fabricator.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-Fabricator(:announcement_mute) do
-  account
-  announcement
-end
diff --git a/spec/fabricators/announcement_reaction_fabricator.rb b/spec/fabricators/announcement_reaction_fabricator.rb
deleted file mode 100644
index f923c59c6..000000000
--- a/spec/fabricators/announcement_reaction_fabricator.rb
+++ /dev/null
@@ -1,5 +0,0 @@
-Fabricator(:announcement_reaction) do
-  account
-  announcement
-  name '🌿'
-end
diff --git a/spec/fabricators/appeal_fabricator.rb b/spec/fabricators/appeal_fabricator.rb
index 339363822..039086c4e 100644
--- a/spec/fabricators/appeal_fabricator.rb
+++ b/spec/fabricators/appeal_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:appeal) do
   strike(fabricator: :account_warning)
   account { |attrs| attrs[:strike].target_account }
diff --git a/spec/fabricators/application_fabricator.rb b/spec/fabricators/application_fabricator.rb
index 42b7009dc..272821304 100644
--- a/spec/fabricators/application_fabricator.rb
+++ b/spec/fabricators/application_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:application, from: Doorkeeper::Application) do
   name         'Example'
   website      'http://example.com'
diff --git a/spec/fabricators/backup_fabricator.rb b/spec/fabricators/backup_fabricator.rb
index 99a5bdcda..c73ae54be 100644
--- a/spec/fabricators/backup_fabricator.rb
+++ b/spec/fabricators/backup_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:backup) do
   user
 end
diff --git a/spec/fabricators/block_fabricator.rb b/spec/fabricators/block_fabricator.rb
index 379931ba6..c2e9e9628 100644
--- a/spec/fabricators/block_fabricator.rb
+++ b/spec/fabricators/block_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:block) do
   account
   target_account { Fabricate(:account) }
diff --git a/spec/fabricators/bookmark_fabricator.rb b/spec/fabricators/bookmark_fabricator.rb
index 12cbc5bfa..e21046fc2 100644
--- a/spec/fabricators/bookmark_fabricator.rb
+++ b/spec/fabricators/bookmark_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:bookmark) do
   account
   status
diff --git a/spec/fabricators/canonical_email_block_fabricator.rb b/spec/fabricators/canonical_email_block_fabricator.rb
index a0b6e0d22..21d7c2402 100644
--- a/spec/fabricators/canonical_email_block_fabricator.rb
+++ b/spec/fabricators/canonical_email_block_fabricator.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
 Fabricator(:canonical_email_block) do
-  email "test@example.com"
+  email 'test@example.com'
   reference_account { Fabricate(:account) }
 end
diff --git a/spec/fabricators/conversation_account_fabricator.rb b/spec/fabricators/conversation_account_fabricator.rb
deleted file mode 100644
index f57ffd535..000000000
--- a/spec/fabricators/conversation_account_fabricator.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-Fabricator(:conversation_account) do
-  account                 nil
-  conversation            nil
-  participant_account_ids ""
-  last_status             nil
-end
diff --git a/spec/fabricators/conversation_fabricator.rb b/spec/fabricators/conversation_fabricator.rb
index b4fadb46b..07c6780bf 100644
--- a/spec/fabricators/conversation_fabricator.rb
+++ b/spec/fabricators/conversation_fabricator.rb
@@ -1,2 +1,4 @@
+# frozen_string_literal: true
+
 Fabricator(:conversation) do
 end
diff --git a/spec/fabricators/conversation_mute_fabricator.rb b/spec/fabricators/conversation_mute_fabricator.rb
deleted file mode 100644
index 84f131c26..000000000
--- a/spec/fabricators/conversation_mute_fabricator.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-Fabricator(:conversation_mute) do
-end
diff --git a/spec/fabricators/custom_emoji_category_fabricator.rb b/spec/fabricators/custom_emoji_category_fabricator.rb
deleted file mode 100644
index f593b95ed..000000000
--- a/spec/fabricators/custom_emoji_category_fabricator.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-Fabricator(:custom_emoji_category) do
-  name "MyString"
-end
diff --git a/spec/fabricators/custom_emoji_fabricator.rb b/spec/fabricators/custom_emoji_fabricator.rb
index 18a7d23dc..fa570eec6 100644
--- a/spec/fabricators/custom_emoji_fabricator.rb
+++ b/spec/fabricators/custom_emoji_fabricator.rb
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:custom_emoji) do
   shortcode 'coolcat'
   domain    nil
-  image     { File.open(Rails.root.join('spec', 'fixtures', 'files', 'emojo.png')) }
+  image     { Rails.root.join('spec', 'fixtures', 'files', 'emojo.png').open }
 end
diff --git a/spec/fabricators/custom_filter_fabricator.rb b/spec/fabricators/custom_filter_fabricator.rb
index 64297a7e3..5fee4f01a 100644
--- a/spec/fabricators/custom_filter_fabricator.rb
+++ b/spec/fabricators/custom_filter_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:custom_filter) do
   account
   expires_at nil
diff --git a/spec/fabricators/custom_filter_keyword_fabricator.rb b/spec/fabricators/custom_filter_keyword_fabricator.rb
index 0f101dcd1..f1fb440dc 100644
--- a/spec/fabricators/custom_filter_keyword_fabricator.rb
+++ b/spec/fabricators/custom_filter_keyword_fabricator.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
 Fabricator(:custom_filter_keyword) do
   custom_filter
-  keyword       'discourse'
+  keyword 'discourse'
 end
diff --git a/spec/fabricators/custom_filter_status_fabricator.rb b/spec/fabricators/custom_filter_status_fabricator.rb
index d082b81c5..3ef1d0ec8 100644
--- a/spec/fabricators/custom_filter_status_fabricator.rb
+++ b/spec/fabricators/custom_filter_status_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:custom_filter_status) do
   custom_filter
   status
diff --git a/spec/fabricators/device_fabricator.rb b/spec/fabricators/device_fabricator.rb
index b15d8248f..26c71b4fd 100644
--- a/spec/fabricators/device_fabricator.rb
+++ b/spec/fabricators/device_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:device) do
   access_token
   account
diff --git a/spec/fabricators/domain_allow_fabricator.rb b/spec/fabricators/domain_allow_fabricator.rb
index 6226b1e20..b32af129b 100644
--- a/spec/fabricators/domain_allow_fabricator.rb
+++ b/spec/fabricators/domain_allow_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:domain_allow) do
-  domain "MyString"
+  domain 'MyString'
 end
diff --git a/spec/fabricators/domain_block_fabricator.rb b/spec/fabricators/domain_block_fabricator.rb
index cc1f928e5..c703a18e9 100644
--- a/spec/fabricators/domain_block_fabricator.rb
+++ b/spec/fabricators/domain_block_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:domain_block) do
   domain { sequence(:domain) { |i| "#{i}#{Faker::Internet.domain_name}" } }
 end
diff --git a/spec/fabricators/email_domain_block_fabricator.rb b/spec/fabricators/email_domain_block_fabricator.rb
index d18af6433..a74cca73d 100644
--- a/spec/fabricators/email_domain_block_fabricator.rb
+++ b/spec/fabricators/email_domain_block_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:email_domain_block) do
   domain { sequence(:domain) { |i| "#{i}#{Faker::Internet.domain_name}" } }
 end
diff --git a/spec/fabricators/encrypted_message_fabricator.rb b/spec/fabricators/encrypted_message_fabricator.rb
index e65f66302..43b310514 100644
--- a/spec/fabricators/encrypted_message_fabricator.rb
+++ b/spec/fabricators/encrypted_message_fabricator.rb
@@ -1,8 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:encrypted_message) do
   device
-  from_account
-  from_device_id   { Faker::Number.number(digits: 5) }
-  type             0
-  body             ""
-  message_franking ""
+  from_account { Fabricate(:account) }
+  from_device_id { Faker::Number.number(digits: 5) }
 end
diff --git a/spec/fabricators/favourite_fabricator.rb b/spec/fabricators/favourite_fabricator.rb
index 464ac8d71..005947e6f 100644
--- a/spec/fabricators/favourite_fabricator.rb
+++ b/spec/fabricators/favourite_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:favourite) do
   account
   status
diff --git a/spec/fabricators/featured_tag_fabricator.rb b/spec/fabricators/featured_tag_fabricator.rb
deleted file mode 100644
index 25cbdaac0..000000000
--- a/spec/fabricators/featured_tag_fabricator.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-Fabricator(:featured_tag) do
-  account
-  tag
-  statuses_count 1_337
-  last_status_at Time.now.utc
-end
diff --git a/spec/fabricators/follow_fabricator.rb b/spec/fabricators/follow_fabricator.rb
index 9b25dc547..41b5305d5 100644
--- a/spec/fabricators/follow_fabricator.rb
+++ b/spec/fabricators/follow_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:follow) do
   account
   target_account { Fabricate(:account) }
diff --git a/spec/fabricators/follow_recommendation_suppression_fabricator.rb b/spec/fabricators/follow_recommendation_suppression_fabricator.rb
deleted file mode 100644
index 4a6a07a66..000000000
--- a/spec/fabricators/follow_recommendation_suppression_fabricator.rb
+++ /dev/null
@@ -1,3 +0,0 @@
-Fabricator(:follow_recommendation_suppression) do
-  account
-end
diff --git a/spec/fabricators/follow_request_fabricator.rb b/spec/fabricators/follow_request_fabricator.rb
index c00ddf84d..86b82611f 100644
--- a/spec/fabricators/follow_request_fabricator.rb
+++ b/spec/fabricators/follow_request_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:follow_request) do
   account
   target_account { Fabricate(:account, locked: true) }
diff --git a/spec/fabricators/identity_fabricator.rb b/spec/fabricators/identity_fabricator.rb
index bc832df9f..58072c0d6 100644
--- a/spec/fabricators/identity_fabricator.rb
+++ b/spec/fabricators/identity_fabricator.rb
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:identity) do
-  user     nil
-  provider "MyString"
-  uid      "MyString"
+  user
+  provider 'MyString'
+  uid      'MyString'
 end
diff --git a/spec/fabricators/import_fabricator.rb b/spec/fabricators/import_fabricator.rb
deleted file mode 100644
index e2eb1e0df..000000000
--- a/spec/fabricators/import_fabricator.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-Fabricator(:import) do
-end
diff --git a/spec/fabricators/invite_fabricator.rb b/spec/fabricators/invite_fabricator.rb
index 62b9b3904..4f47d6ce2 100644
--- a/spec/fabricators/invite_fabricator.rb
+++ b/spec/fabricators/invite_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:invite) do
   user
   expires_at nil
diff --git a/spec/fabricators/ip_block_fabricator.rb b/spec/fabricators/ip_block_fabricator.rb
deleted file mode 100644
index 31dc336e6..000000000
--- a/spec/fabricators/ip_block_fabricator.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-Fabricator(:ip_block) do
-  ip         ""
-  severity   ""
-  expires_at "2020-10-08 22:20:37"
-  comment    "MyText"
-end
\ No newline at end of file
diff --git a/spec/fabricators/list_account_fabricator.rb b/spec/fabricators/list_account_fabricator.rb
index 30e4004aa..00dde83cd 100644
--- a/spec/fabricators/list_account_fabricator.rb
+++ b/spec/fabricators/list_account_fabricator.rb
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:list_account) do
-  list    nil
-  account nil
-  follow  nil
+  list
+  account
+  before_create { |list_account, _| list_account.list.account.follow!(account) }
 end
diff --git a/spec/fabricators/list_fabricator.rb b/spec/fabricators/list_fabricator.rb
index c3db690fa..47af752b8 100644
--- a/spec/fabricators/list_fabricator.rb
+++ b/spec/fabricators/list_fabricator.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
 Fabricator(:list) do
   account
-  title "MyString"
+  title 'MyString'
 end
diff --git a/spec/fabricators/login_activity_fabricator.rb b/spec/fabricators/login_activity_fabricator.rb
index 686fd6483..2b30658ff 100644
--- a/spec/fabricators/login_activity_fabricator.rb
+++ b/spec/fabricators/login_activity_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:login_activity) do
   user
   authentication_method 'password'
diff --git a/spec/fabricators/marker_fabricator.rb b/spec/fabricators/marker_fabricator.rb
index 0c94150e0..561c2553a 100644
--- a/spec/fabricators/marker_fabricator.rb
+++ b/spec/fabricators/marker_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:marker) do
   user
   timeline     'home'
diff --git a/spec/fabricators/media_attachment_fabricator.rb b/spec/fabricators/media_attachment_fabricator.rb
index 651927c2d..4a081dccb 100644
--- a/spec/fabricators/media_attachment_fabricator.rb
+++ b/spec/fabricators/media_attachment_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:media_attachment) do
   account
 
diff --git a/spec/fabricators/mention_fabricator.rb b/spec/fabricators/mention_fabricator.rb
index cb5fe4299..5a8392827 100644
--- a/spec/fabricators/mention_fabricator.rb
+++ b/spec/fabricators/mention_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:mention) do
   account
   status
diff --git a/spec/fabricators/mute_fabricator.rb b/spec/fabricators/mute_fabricator.rb
index 30d20e87e..242ae2b08 100644
--- a/spec/fabricators/mute_fabricator.rb
+++ b/spec/fabricators/mute_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:mute) do
   account
   target_account { Fabricate(:account) }
diff --git a/spec/fabricators/notification_fabricator.rb b/spec/fabricators/notification_fabricator.rb
index 638844e0f..959fda913 100644
--- a/spec/fabricators/notification_fabricator.rb
+++ b/spec/fabricators/notification_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:notification) do
   activity fabricator: [:mention, :status, :follow, :follow_request, :favourite].sample
   account
diff --git a/spec/fabricators/one_time_key_fabricator.rb b/spec/fabricators/one_time_key_fabricator.rb
index 8794baeb5..cfb365cab 100644
--- a/spec/fabricators/one_time_key_fabricator.rb
+++ b/spec/fabricators/one_time_key_fabricator.rb
@@ -1,7 +1,9 @@
+# frozen_string_literal: true
+
 Fabricator(:one_time_key) do
   device
   key_id { Faker::Alphanumeric.alphanumeric(number: 10) }
-  key    { Base64.strict_encode64(Ed25519::SigningKey.generate.verify_key.to_bytes) }
+  key { Base64.strict_encode64(Ed25519::SigningKey.generate.verify_key.to_bytes) }
 
   signature do |attrs|
     signing_key = Ed25519::SigningKey.generate
diff --git a/spec/fabricators/poll_fabricator.rb b/spec/fabricators/poll_fabricator.rb
index 746610f7c..19c3b1d16 100644
--- a/spec/fabricators/poll_fabricator.rb
+++ b/spec/fabricators/poll_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:poll) do
   account
   status
diff --git a/spec/fabricators/poll_vote_fabricator.rb b/spec/fabricators/poll_vote_fabricator.rb
index 51f9b006e..9099ae96f 100644
--- a/spec/fabricators/poll_vote_fabricator.rb
+++ b/spec/fabricators/poll_vote_fabricator.rb
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:poll_vote) do
   account
   poll
-  choice  0
+  choice 0
 end
diff --git a/spec/fabricators/preview_card_fabricator.rb b/spec/fabricators/preview_card_fabricator.rb
index 99b5edc43..b8f2c5097 100644
--- a/spec/fabricators/preview_card_fabricator.rb
+++ b/spec/fabricators/preview_card_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:preview_card) do
   url { Faker::Internet.url }
   title { Faker::Lorem.sentence }
diff --git a/spec/fabricators/preview_card_provider_fabricator.rb b/spec/fabricators/preview_card_provider_fabricator.rb
new file mode 100644
index 000000000..78db71000
--- /dev/null
+++ b/spec/fabricators/preview_card_provider_fabricator.rb
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+Fabricator(:preview_card_provider) do
+  domain { Faker::Internet.domain_name }
+end
diff --git a/spec/fabricators/relay_fabricator.rb b/spec/fabricators/relay_fabricator.rb
index 488913f77..ad8ba86fc 100644
--- a/spec/fabricators/relay_fabricator.rb
+++ b/spec/fabricators/relay_fabricator.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
 Fabricator(:relay) do
-  inbox_url "https://example.com/inbox"
+  inbox_url 'https://example.com/inbox'
   state :idle
 end
diff --git a/spec/fabricators/report_fabricator.rb b/spec/fabricators/report_fabricator.rb
index 2c7101e09..7124773ad 100644
--- a/spec/fabricators/report_fabricator.rb
+++ b/spec/fabricators/report_fabricator.rb
@@ -1,6 +1,8 @@
+# frozen_string_literal: true
+
 Fabricator(:report) do
   account
   target_account  { Fabricate(:account) }
-  comment         "You nasty"
+  comment         'You nasty'
   action_taken_at nil
 end
diff --git a/spec/fabricators/report_note_fabricator.rb b/spec/fabricators/report_note_fabricator.rb
index e139efffb..f257fe2b7 100644
--- a/spec/fabricators/report_note_fabricator.rb
+++ b/spec/fabricators/report_note_fabricator.rb
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:report_note) do
   report
   account { Fabricate(:account) }
-  content "Test Content"
+  content 'Test Content'
 end
diff --git a/spec/fabricators/rule_fabricator.rb b/spec/fabricators/rule_fabricator.rb
index bc29bc48e..a29fd905a 100644
--- a/spec/fabricators/rule_fabricator.rb
+++ b/spec/fabricators/rule_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:rule) do
   priority   0
   deleted_at nil
diff --git a/spec/fabricators/scheduled_status_fabricator.rb b/spec/fabricators/scheduled_status_fabricator.rb
index 52384d137..e517f258a 100644
--- a/spec/fabricators/scheduled_status_fabricator.rb
+++ b/spec/fabricators/scheduled_status_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:scheduled_status) do
   account
   scheduled_at { 20.hours.from_now }
diff --git a/spec/fabricators/session_activation_fabricator.rb b/spec/fabricators/session_activation_fabricator.rb
index 526faaec2..b28d5e41d 100644
--- a/spec/fabricators/session_activation_fabricator.rb
+++ b/spec/fabricators/session_activation_fabricator.rb
@@ -1,4 +1,6 @@
+# frozen_string_literal: true
+
 Fabricator(:session_activation) do
   user
-  session_id "MyString"
+  session_id 'MyString'
 end
diff --git a/spec/fabricators/setting_fabricator.rb b/spec/fabricators/setting_fabricator.rb
index 336d7c355..ce9a48e90 100644
--- a/spec/fabricators/setting_fabricator.rb
+++ b/spec/fabricators/setting_fabricator.rb
@@ -1,4 +1,5 @@
 # frozen_string_literal: true
 
 Fabricator(:setting) do
+  var 'var'
 end
diff --git a/spec/fabricators/site_upload_fabricator.rb b/spec/fabricators/site_upload_fabricator.rb
index 2efc57e28..87553ccb8 100644
--- a/spec/fabricators/site_upload_fabricator.rb
+++ b/spec/fabricators/site_upload_fabricator.rb
@@ -1,3 +1,6 @@
+# frozen_string_literal: true
+
 Fabricator(:site_upload) do
-  file { File.open(File.join(Rails.root, 'spec', 'fabricators', 'assets', 'utah_teapot.png')) }
+  file { Rails.root.join('spec', 'fabricators', 'assets', 'utah_teapot.png').open }
+  var 'thumbnail'
 end
diff --git a/spec/fabricators/status_edit_fabricator.rb b/spec/fabricators/status_edit_fabricator.rb
deleted file mode 100644
index 21b793747..000000000
--- a/spec/fabricators/status_edit_fabricator.rb
+++ /dev/null
@@ -1,7 +0,0 @@
-Fabricator(:status_edit) do
-  status                    nil
-  account                   nil
-  text                      "MyText"
-  spoiler_text              "MyText"
-  media_attachments_changed false
-end
\ No newline at end of file
diff --git a/spec/fabricators/status_fabricator.rb b/spec/fabricators/status_fabricator.rb
index 04bbbcf4b..17ac9ccd8 100644
--- a/spec/fabricators/status_fabricator.rb
+++ b/spec/fabricators/status_fabricator.rb
@@ -1,6 +1,8 @@
+# frozen_string_literal: true
+
 Fabricator(:status) do
   account
-  text "Lorem ipsum dolor sit amet"
+  text 'Lorem ipsum dolor sit amet'
 
   after_build do |status|
     status.uri = Faker::Internet.device_token if !status.account.local? && status.uri.nil?
diff --git a/spec/fabricators/status_pin_fabricator.rb b/spec/fabricators/status_pin_fabricator.rb
index f1f1c05f3..9ad0ac9de 100644
--- a/spec/fabricators/status_pin_fabricator.rb
+++ b/spec/fabricators/status_pin_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:status_pin) do
   account
   status { |attrs| Fabricate(:status, account: attrs[:account], visibility: :public) }
diff --git a/spec/fabricators/status_stat_fabricator.rb b/spec/fabricators/status_stat_fabricator.rb
deleted file mode 100644
index 9c67fd404..000000000
--- a/spec/fabricators/status_stat_fabricator.rb
+++ /dev/null
@@ -1,6 +0,0 @@
-Fabricator(:status_stat) do
-  status_id        nil
-  replies_count    ""
-  reblogs_count    ""
-  favourites_count ""
-end
diff --git a/spec/fabricators/system_key_fabricator.rb b/spec/fabricators/system_key_fabricator.rb
index f808495e0..ef6cec9c4 100644
--- a/spec/fabricators/system_key_fabricator.rb
+++ b/spec/fabricators/system_key_fabricator.rb
@@ -1,3 +1,4 @@
-Fabricator(:system_key) do
+# frozen_string_literal: true
 
+Fabricator(:system_key) do
 end
diff --git a/spec/fabricators/tag_fabricator.rb b/spec/fabricators/tag_fabricator.rb
index 33d57c928..a7b52e967 100644
--- a/spec/fabricators/tag_fabricator.rb
+++ b/spec/fabricators/tag_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:tag) do
   name { sequence(:hashtag) { |i| "#{Faker::Lorem.word}#{i}" } }
 end
diff --git a/spec/fabricators/tag_follow_fabricator.rb b/spec/fabricators/tag_follow_fabricator.rb
index a2cccb07a..cbe5b0989 100644
--- a/spec/fabricators/tag_follow_fabricator.rb
+++ b/spec/fabricators/tag_follow_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:tag_follow) do
   tag
   account
diff --git a/spec/fabricators/unavailable_domain_fabricator.rb b/spec/fabricators/unavailable_domain_fabricator.rb
index f661b87c4..cb9707020 100644
--- a/spec/fabricators/unavailable_domain_fabricator.rb
+++ b/spec/fabricators/unavailable_domain_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:unavailable_domain) do
-  domain { Faker::Internet.domain }
+  domain { Faker::Internet.domain_name }
 end
diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb
index 10ad2c53a..9031d5cd0 100644
--- a/spec/fabricators/user_fabricator.rb
+++ b/spec/fabricators/user_fabricator.rb
@@ -1,7 +1,10 @@
+# frozen_string_literal: true
+
 Fabricator(:user) do
   account      { Fabricate.build(:account, user: nil) }
   email        { sequence(:email) { |i| "#{i}#{Faker::Internet.email}" } }
-  password     "123456789"
+  password     '123456789'
   confirmed_at { Time.zone.now }
-  agreement    true
+  current_sign_in_at { Time.zone.now }
+  agreement true
 end
diff --git a/spec/fabricators/user_invite_request_fabricator.rb b/spec/fabricators/user_invite_request_fabricator.rb
deleted file mode 100644
index 5cc6ae56f..000000000
--- a/spec/fabricators/user_invite_request_fabricator.rb
+++ /dev/null
@@ -1,4 +0,0 @@
-Fabricator(:user_invite_request) do
-  user
-  text { Faker::Lorem.sentence }
-end
diff --git a/spec/fabricators/user_role_fabricator.rb b/spec/fabricators/user_role_fabricator.rb
index 28f76c8c4..d44322760 100644
--- a/spec/fabricators/user_role_fabricator.rb
+++ b/spec/fabricators/user_role_fabricator.rb
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
 Fabricator(:user_role) do
-  name        "MyString"
-  color       "MyString"
-  permissions ""
-end
\ No newline at end of file
+  name        'MyString'
+  color       ''
+  permissions 0
+end
diff --git a/spec/fabricators/web_push_subscription_fabricator.rb b/spec/fabricators/web_push_subscription_fabricator.rb
index 97f90675d..baffdbf83 100644
--- a/spec/fabricators/web_push_subscription_fabricator.rb
+++ b/spec/fabricators/web_push_subscription_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:web_push_subscription, from: Web::PushSubscription) do
   endpoint   Faker::Internet.url
   key_p256dh Faker::Internet.password
diff --git a/spec/fabricators/web_setting_fabricator.rb b/spec/fabricators/web_setting_fabricator.rb
deleted file mode 100644
index 369b86bc1..000000000
--- a/spec/fabricators/web_setting_fabricator.rb
+++ /dev/null
@@ -1,2 +0,0 @@
-Fabricator(:web_setting, from: Web::Setting) do
-end
diff --git a/spec/fabricators/webauthn_credential_fabricator.rb b/spec/fabricators/webauthn_credential_fabricator.rb
index ba59ce967..b578d55f0 100644
--- a/spec/fabricators/webauthn_credential_fabricator.rb
+++ b/spec/fabricators/webauthn_credential_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:webauthn_credential) do
   user_id { Fabricate(:user).id }
   external_id { Base64.urlsafe_encode64(SecureRandom.random_bytes(16)) }
diff --git a/spec/fabricators/webhook_fabricator.rb b/spec/fabricators/webhook_fabricator.rb
index fa4f17b55..477e715ef 100644
--- a/spec/fabricators/webhook_fabricator.rb
+++ b/spec/fabricators/webhook_fabricator.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
 Fabricator(:webhook) do
   url { Faker::Internet.url }
   secret { SecureRandom.hex }