diff --git a/.github/renovate.json5 b/.github/renovate.json5
index 8a10676283..3d3499922e 100644
--- a/.github/renovate.json5
+++ b/.github/renovate.json5
@@ -14,6 +14,11 @@
// If we do not want a package to be grouped with others, we need to set its groupName
// to `null` after any other rule set it to something.
dependencyDashboardHeader: 'This issue lists Renovate updates and detected dependencies. Read the [Dependency Dashboard](https://docs.renovatebot.com/key-concepts/dashboard/) docs to learn more. Before approving any upgrade: read the description and comments in the [`renovate.json5` file](https://github.com/mastodon/mastodon/blob/main/.github/renovate.json5).',
+ constraints: {
+ // Mastodon should work on Ruby 3.4, but its test dependencies are currently uninstallable on Ruby 3.4.
+ // TODO: remove this once https://github.com/briandunn/flatware/issues/103 is fixed
+ ruby: '3.3',
+ },
postUpdateOptions: ['yarnDedupeHighest'],
packageRules: [
{
diff --git a/Gemfile b/Gemfile
index b626b5511c..51f6d01c22 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,7 +1,7 @@
# frozen_string_literal: true
source 'https://rubygems.org'
-ruby '>= 3.2.0'
+ruby '>= 3.2.0', '< 3.5'
gem 'propshaft'
gem 'puma', '~> 6.3'
@@ -79,7 +79,7 @@ gem 'redis', '~> 4.5', require: ['redis', 'redis/connection/hiredis']
gem 'redis-namespace', '~> 1.10'
gem 'rqrcode', '~> 2.2'
gem 'ruby-progressbar', '~> 1.13'
-gem 'sanitize', '~> 6.0'
+gem 'sanitize', '~> 7.0'
gem 'scenic', '~> 1.7'
gem 'sidekiq', '~> 6.5'
gem 'sidekiq-bulk', '~> 0.2.0'
@@ -183,7 +183,7 @@ group :development do
gem 'letter_opener_web', '~> 3.0'
# Security analysis CLI tools
- gem 'brakeman', '~> 6.0', require: false
+ gem 'brakeman', '~> 7.0', require: false
gem 'bundler-audit', '~> 0.9', require: false
# Linter CLI for HAML files
@@ -222,7 +222,7 @@ gem 'concurrent-ruby', require: false
gem 'connection_pool', require: false
gem 'xorcist', '~> 1.1'
-gem 'net-http', '~> 0.5.0'
+gem 'net-http', '~> 0.6.0'
gem 'rubyzip', '~> 2.3'
gem 'hcaptcha', '~> 7.1'
diff --git a/Gemfile.lock b/Gemfile.lock
index a18c5a7882..24c4d04766 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -94,8 +94,8 @@ GEM
ast (2.4.2)
attr_required (1.0.2)
aws-eventstream (1.3.0)
- aws-partitions (1.1025.0)
- aws-sdk-core (3.214.0)
+ aws-partitions (1.1029.0)
+ aws-sdk-core (3.214.1)
aws-eventstream (~> 1, >= 1.3.0)
aws-partitions (~> 1, >= 1.992.0)
aws-sigv4 (~> 1.9)
@@ -126,7 +126,7 @@ GEM
blurhash (0.1.8)
bootsnap (1.18.4)
msgpack (~> 1.2)
- brakeman (6.2.2)
+ brakeman (7.0.0)
racc
browser (6.2.0)
brpoplpush-redis_script (0.1.3)
@@ -217,7 +217,7 @@ GEM
htmlentities (~> 4.3.3)
launchy (>= 2.1, < 4.0)
mail (~> 2.7)
- erubi (1.13.0)
+ erubi (1.13.1)
et-orbi (1.2.11)
tzinfo
excon (0.112.0)
@@ -234,7 +234,7 @@ GEM
net-http (>= 0.5.0)
fast_blank (1.0.1)
fastimage (2.3.1)
- ffi (1.17.0)
+ ffi (1.17.1)
ffi-compiler (1.3.2)
ffi (>= 1.15.5)
rake
@@ -390,7 +390,7 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
- loofah (2.23.1)
+ loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
mail (2.8.1)
@@ -413,9 +413,9 @@ GEM
msgpack (1.7.5)
multi_json (1.15.0)
mutex_m (0.3.0)
- net-http (0.5.0)
+ net-http (0.6.0)
uri
- net-imap (0.5.2)
+ net-imap (0.5.4)
date
net-protocol
net-ldap (0.19.0)
@@ -426,10 +426,10 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
- nokogiri (1.17.2)
+ nokogiri (1.18.1)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
- oj (3.16.8)
+ oj (3.16.9)
bigdecimal (>= 3.0)
ostruct (>= 0.2)
omniauth (2.1.2)
@@ -608,7 +608,7 @@ GEM
rack
rack-session (1.0.2)
rack (< 3)
- rack-test (2.1.0)
+ rack-test (2.2.0)
rack (>= 1.3)
rackup (1.0.1)
rack (< 3)
@@ -749,9 +749,9 @@ GEM
fugit (~> 1.1, >= 1.11.1)
safety_net_attestation (0.4.0)
jwt (~> 2.0)
- sanitize (6.1.3)
+ sanitize (7.0.0)
crass (~> 1.0.2)
- nokogiri (>= 1.12.0)
+ nokogiri (>= 1.16.8)
scenic (1.8.0)
activerecord (>= 4.0.0)
railties (>= 4.0.0)
@@ -811,7 +811,7 @@ GEM
climate_control
test-prof (1.4.3)
thor (1.3.2)
- tilt (2.4.0)
+ tilt (2.5.0)
timeout (0.4.3)
tpm-key_attestation (0.12.1)
bindata (~> 2.4)
@@ -891,7 +891,7 @@ DEPENDENCIES
binding_of_caller (~> 1.0)
blurhash (~> 0.1)
bootsnap (~> 1.18.0)
- brakeman (~> 6.0)
+ brakeman (~> 7.0)
browser
bundler-audit (~> 0.9)
capybara (~> 3.39)
@@ -948,7 +948,7 @@ DEPENDENCIES
memory_profiler
mime-types (~> 3.6.0)
mutex_m
- net-http (~> 0.5.0)
+ net-http (~> 0.6.0)
net-ldap (~> 0.18)
nokogiri (~> 1.15)
oj (~> 3.14)
@@ -1007,7 +1007,7 @@ DEPENDENCIES
ruby-progressbar (~> 1.13)
ruby-vips (~> 2.2)
rubyzip (~> 2.3)
- sanitize (~> 6.0)
+ sanitize (~> 7.0)
scenic (~> 1.7)
selenium-webdriver
shoulda-matchers
@@ -1037,4 +1037,4 @@ RUBY VERSION
ruby 3.3.6p108
BUNDLED WITH
- 2.6.1
+ 2.6.2
diff --git a/app/javascript/mastodon/components/status.jsx b/app/javascript/mastodon/components/status.jsx
index a2759b8345..2be3b94285 100644
--- a/app/javascript/mastodon/components/status.jsx
+++ b/app/javascript/mastodon/components/status.jsx
@@ -384,6 +384,7 @@ class Status extends ImmutablePureComponent {
toggleHidden: this.handleHotkeyToggleHidden,
toggleSensitive: this.handleHotkeyToggleSensitive,
openMedia: this.handleHotkeyOpenMedia,
+ onTranslate: this.handleTranslate,
};
let media, statusAvatar, prepend, rebloggedByText;
diff --git a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx
index e342958480..285f0ea7cf 100644
--- a/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx
+++ b/app/javascript/mastodon/features/keyboard_shortcuts/index.jsx
@@ -66,6 +66,10 @@ class KeyboardShortcuts extends ImmutablePureComponent {
enter, o |
|
+
+ t |
+ |
+
e |
|
diff --git a/app/javascript/mastodon/features/status/index.jsx b/app/javascript/mastodon/features/status/index.jsx
index 8da3d7e11a..4b9e035a5f 100644
--- a/app/javascript/mastodon/features/status/index.jsx
+++ b/app/javascript/mastodon/features/status/index.jsx
@@ -474,6 +474,10 @@ class Status extends ImmutablePureComponent {
this.handleToggleMediaVisibility();
};
+ handleHotkeyTranslate = () => {
+ this.handleTranslate(this.props.status);
+ };
+
handleMoveUp = id => {
const { status, ancestorsIds, descendantsIds } = this.props;
@@ -650,6 +654,7 @@ class Status extends ImmutablePureComponent {
toggleHidden: this.handleHotkeyToggleHidden,
toggleSensitive: this.handleHotkeyToggleSensitive,
openMedia: this.handleHotkeyOpenMedia,
+ onTranslate: this.handleHotkeyTranslate,
};
return (
diff --git a/app/javascript/mastodon/features/ui/index.jsx b/app/javascript/mastodon/features/ui/index.jsx
index 052ac0ac5b..bfc540a331 100644
--- a/app/javascript/mastodon/features/ui/index.jsx
+++ b/app/javascript/mastodon/features/ui/index.jsx
@@ -126,6 +126,7 @@ const keyMap = {
toggleHidden: 'x',
toggleSensitive: 'h',
openMedia: 'e',
+ onTranslate: 't',
};
class SwitchingColumnsArea extends PureComponent {
diff --git a/app/javascript/mastodon/locales/da.json b/app/javascript/mastodon/locales/da.json
index dce0679982..335f805576 100644
--- a/app/javascript/mastodon/locales/da.json
+++ b/app/javascript/mastodon/locales/da.json
@@ -835,6 +835,7 @@
"status.reblogs.empty": "Ingen har endnu fremhævet dette indlæg. Når nogen gør, vil det fremgå hér.",
"status.redraft": "Slet og omformulér",
"status.remove_bookmark": "Fjern bogmærke",
+ "status.remove_favourite": "Fjern fra favoritter",
"status.replied_in_thread": "Svaret i tråd",
"status.replied_to": "Besvarede {name}",
"status.reply": "Besvar",
diff --git a/app/javascript/mastodon/locales/de.json b/app/javascript/mastodon/locales/de.json
index b0650a27cb..967e7a1fe8 100644
--- a/app/javascript/mastodon/locales/de.json
+++ b/app/javascript/mastodon/locales/de.json
@@ -177,7 +177,7 @@
"compose_form.hashtag_warning": "Dieser Beitrag wird unter keinem Hashtag sichtbar sein, weil er nicht öffentlich ist. Nur öffentliche Beiträge können nach Hashtags durchsucht werden.",
"compose_form.lock_disclaimer": "Dein Profil ist nicht {locked}. Andere können dir folgen und deine Beiträge sehen, die nur für Follower bestimmt sind.",
"compose_form.lock_disclaimer.lock": "geschützt",
- "compose_form.placeholder": "Was gibt’s Neues?",
+ "compose_form.placeholder": "Was gibts Neues?",
"compose_form.poll.duration": "Umfragedauer",
"compose_form.poll.multiple": "Mehrfachauswahl",
"compose_form.poll.option_placeholder": "{number}. Auswahl",
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Diesen Beitrag hat bisher noch niemand geteilt. Sobald es jemand tut, wird das Profil hier erscheinen.",
"status.redraft": "Löschen und neu erstellen",
"status.remove_bookmark": "Lesezeichen entfernen",
+ "status.remove_favourite": "Aus Favoriten entfernen",
"status.replied_in_thread": "Antwortete im Thread",
"status.replied_to": "Antwortete {name}",
"status.reply": "Antworten",
diff --git a/app/javascript/mastodon/locales/en.json b/app/javascript/mastodon/locales/en.json
index 2a4258a7d4..cf5834835d 100644
--- a/app/javascript/mastodon/locales/en.json
+++ b/app/javascript/mastodon/locales/en.json
@@ -457,6 +457,7 @@
"keyboard_shortcuts.toggle_hidden": "Show/hide text behind CW",
"keyboard_shortcuts.toggle_sensitivity": "Show/hide media",
"keyboard_shortcuts.toot": "Start a new post",
+ "keyboard_shortcuts.translate": "to translate a post",
"keyboard_shortcuts.unfocus": "Unfocus compose textarea/search",
"keyboard_shortcuts.up": "Move up in the list",
"lightbox.close": "Close",
diff --git a/app/javascript/mastodon/locales/eo.json b/app/javascript/mastodon/locales/eo.json
index 19ac7c34c7..6f5da03daf 100644
--- a/app/javascript/mastodon/locales/eo.json
+++ b/app/javascript/mastodon/locales/eo.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Ankoraŭ neniu diskonigis tiun afiŝon. Kiam iu faras tion, ri aperos ĉi tie.",
"status.redraft": "Forigi kaj reskribi",
"status.remove_bookmark": "Forigi legosignon",
+ "status.remove_favourite": "Forigi el plej ŝatataj",
"status.replied_in_thread": "Respondis en fadeno",
"status.replied_to": "Respondis al {name}",
"status.reply": "Respondi",
diff --git a/app/javascript/mastodon/locales/es-AR.json b/app/javascript/mastodon/locales/es-AR.json
index a4ee54ac46..3e2e796691 100644
--- a/app/javascript/mastodon/locales/es-AR.json
+++ b/app/javascript/mastodon/locales/es-AR.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Todavía nadie adhirió a este mensaje. Cuando alguien lo haga, se mostrará acá.",
"status.redraft": "Eliminar mensaje original y editarlo",
"status.remove_bookmark": "Quitar marcador",
+ "status.remove_favourite": "Quitar de favoritos",
"status.replied_in_thread": "Respuesta en hilo",
"status.replied_to": "Respondió a {name}",
"status.reply": "Responder",
diff --git a/app/javascript/mastodon/locales/es-MX.json b/app/javascript/mastodon/locales/es-MX.json
index 8f3034b5b8..ab65bbb6d4 100644
--- a/app/javascript/mastodon/locales/es-MX.json
+++ b/app/javascript/mastodon/locales/es-MX.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Nadie impulsó esta publicación todavía. Cuando alguien lo haga, aparecerá aquí.",
"status.redraft": "Borrar y volver a borrador",
"status.remove_bookmark": "Eliminar marcador",
+ "status.remove_favourite": "Eliminar de favoritos",
"status.replied_in_thread": "Respondido en el hilo",
"status.replied_to": "Respondió a {name}",
"status.reply": "Responder",
diff --git a/app/javascript/mastodon/locales/es.json b/app/javascript/mastodon/locales/es.json
index 9957af7d0b..82f858f667 100644
--- a/app/javascript/mastodon/locales/es.json
+++ b/app/javascript/mastodon/locales/es.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Nadie ha impulsado esta publicación todavía. Cuando alguien lo haga, aparecerá aquí.",
"status.redraft": "Borrar y volver a borrador",
"status.remove_bookmark": "Eliminar marcador",
+ "status.remove_favourite": "Eliminar de favoritos",
"status.replied_in_thread": "Respondió en el hilo",
"status.replied_to": "Respondió a {name}",
"status.reply": "Responder",
diff --git a/app/javascript/mastodon/locales/et.json b/app/javascript/mastodon/locales/et.json
index 2235ca6463..fb97f55374 100644
--- a/app/javascript/mastodon/locales/et.json
+++ b/app/javascript/mastodon/locales/et.json
@@ -12,7 +12,7 @@
"about.powered_by": "Hajutatud sotsiaalmeedia, mille taga on {mastodon}",
"about.rules": "Serveri reeglid",
"account.account_note_header": "Isiklik märge",
- "account.add_or_remove_from_list": "Lisa või Eemalda nimekirjadest",
+ "account.add_or_remove_from_list": "Lisa või Eemalda loeteludest",
"account.badges.bot": "Robot",
"account.badges.group": "Grupp",
"account.block": "Blokeeri @{name}",
@@ -150,7 +150,7 @@
"column.follow_requests": "Jälgimistaotlused",
"column.home": "Kodu",
"column.list_members": "Halda loendi liikmeid",
- "column.lists": "Nimekirjad",
+ "column.lists": "Loetelud",
"column.mutes": "Vaigistatud kasutajad",
"column.notifications": "Teated",
"column.pins": "Kinnitatud postitused",
@@ -426,7 +426,7 @@
"intervals.full.hours": "{number, plural, one {# tund} other {# tundi}}",
"intervals.full.minutes": "{number, plural, one {# minut} other {# minutit}}",
"keyboard_shortcuts.back": "Liigu tagasi",
- "keyboard_shortcuts.blocked": "avamaks blokeeritud kasutajate nimistut",
+ "keyboard_shortcuts.blocked": "Ava blokeeritud kasutajate nimistu",
"keyboard_shortcuts.boost": "Jaga",
"keyboard_shortcuts.column": "Fookus veerule",
"keyboard_shortcuts.compose": "Fookus teksti koostamise alale",
@@ -474,14 +474,27 @@
"lists.add_to_lists": "Lisa {name} loetellu",
"lists.create": "Loo",
"lists.create_a_list_to_organize": "Loo uus loetelu, et organiseerida oma avalehe lõime",
- "lists.delete": "Kustuta nimekiri",
- "lists.edit": "Muuda nimekirja",
+ "lists.create_list": "Loo loetelu",
+ "lists.delete": "Kustuta loetelu",
+ "lists.done": "Valmis",
+ "lists.edit": "Muuda loetelu",
+ "lists.exclusive": "Peida avalehelt liikmed",
+ "lists.exclusive_hint": "Kui keegi on selles loetelus, peida ta avalehe lõimest, vältimaks tema postituste kaks korda nägemist.",
+ "lists.find_users_to_add": "Leia kasutajaid, keda lisada",
+ "lists.list_members": "Loetelu liikmed",
+ "lists.list_members_count": "{count, plural, one {# liige} other {# liiget}}",
+ "lists.list_name": "Loetelu nimi",
+ "lists.new_list_name": "Loetelu uus nimi",
+ "lists.no_lists_yet": "Pole veel loetelusid.",
"lists.no_members_yet": "Pole veel liikmeid.",
+ "lists.no_results_found": "Ei leidnud tulemusi.",
+ "lists.remove_member": "Eemalda",
"lists.replies_policy.followed": "Igalt jälgitud kasutajalt",
- "lists.replies_policy.list": "Listi liikmetelt",
+ "lists.replies_policy.list": "Loetelu liikmetelt",
"lists.replies_policy.none": "Mitte kelleltki",
"lists.save": "Salvesta",
"lists.search": "Otsi",
+ "lists.show_replies_to": "Kaasa ka loetelu liikmete vastused",
"load_pending": "{count, plural, one {# uus kirje} other {# uut kirjet}}",
"loading_indicator.label": "Laadimine…",
"media_gallery.hide": "Peida",
@@ -511,7 +524,7 @@
"navigation_bar.follow_requests": "Jälgimistaotlused",
"navigation_bar.followed_tags": "Jälgitavad märksõnad",
"navigation_bar.follows_and_followers": "Jälgitavad ja jälgijad",
- "navigation_bar.lists": "Nimekirjad",
+ "navigation_bar.lists": "Loetelud",
"navigation_bar.logout": "Logi välja",
"navigation_bar.moderation": "Modereerimine",
"navigation_bar.mutes": "Vaigistatud kasutajad",
@@ -636,7 +649,11 @@
"notifications_permission_banner.enable": "Luba töölaua märguanded",
"notifications_permission_banner.how_to_control": "Et saada teateid, ajal mil Mastodon pole avatud, luba töölauamärguanded. Saad täpselt määrata, mis tüüpi tegevused tekitavad märguandeid, kasutates peale teadaannete sisse lülitamist üleval olevat nuppu {icon}.",
"notifications_permission_banner.title": "Ära jää millestki ilma",
+ "onboarding.follows.back": "Tagasi",
+ "onboarding.follows.done": "Valmis",
"onboarding.follows.empty": "Kahjuks ei saa hetkel tulemusi näidata. Proovi kasutada otsingut või lehitse uurimise lehte, et leida inimesi, keda jälgida, või proovi hiljem uuesti.",
+ "onboarding.follows.search": "Otsi",
+ "onboarding.follows.title": "Jälgi inimesi, et alustada",
"onboarding.profile.discoverable": "Muuda mu profiil avastatavaks",
"onboarding.profile.discoverable_hint": "Kui nõustud enda avastamisega Mastodonis, võivad sinu postitused ilmuda otsingutulemustes ja trendides ning sinu profiili võidakse soovitada sinuga sarnaste huvidega inimestele.",
"onboarding.profile.display_name": "Näidatav nimi",
diff --git a/app/javascript/mastodon/locales/fi.json b/app/javascript/mastodon/locales/fi.json
index a52a64c9c7..e445473d05 100644
--- a/app/javascript/mastodon/locales/fi.json
+++ b/app/javascript/mastodon/locales/fi.json
@@ -835,6 +835,7 @@
"status.reblogs.empty": "Kukaan ei ole vielä tehostanut tätä julkaisua. Kun joku tekee niin, tulee hän tähän näkyviin.",
"status.redraft": "Poista ja palauta muokattavaksi",
"status.remove_bookmark": "Poista kirjanmerkki",
+ "status.remove_favourite": "Poista suosikeista",
"status.replied_in_thread": "Vastasi ketjuun",
"status.replied_to": "Vastaus käyttäjälle {name}",
"status.reply": "Vastaa",
diff --git a/app/javascript/mastodon/locales/fo.json b/app/javascript/mastodon/locales/fo.json
index d71e5076eb..ff354adf7f 100644
--- a/app/javascript/mastodon/locales/fo.json
+++ b/app/javascript/mastodon/locales/fo.json
@@ -835,6 +835,7 @@
"status.reblogs.empty": "Eingin hevur stimbrað hendan postin enn. Tá onkur stimbrar postin, verður hann sjónligur her.",
"status.redraft": "Strika & ger nýggja kladdu",
"status.remove_bookmark": "Gloym",
+ "status.remove_favourite": "Strika í yndismerkjum",
"status.replied_in_thread": "Svaraði í tráðnum",
"status.replied_to": "Svaraði {name}",
"status.reply": "Svara",
diff --git a/app/javascript/mastodon/locales/fr-CA.json b/app/javascript/mastodon/locales/fr-CA.json
index 6e94eb813a..488a5f3eef 100644
--- a/app/javascript/mastodon/locales/fr-CA.json
+++ b/app/javascript/mastodon/locales/fr-CA.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Personne n’a encore boosté cette publication. Lorsque quelqu’un le fera, elle apparaîtra ici.",
"status.redraft": "Supprimer et réécrire",
"status.remove_bookmark": "Retirer des signets",
+ "status.remove_favourite": "Retirer des favoris",
"status.replied_in_thread": "A répondu dans un fil de discussion",
"status.replied_to": "A répondu à {name}",
"status.reply": "Répondre",
diff --git a/app/javascript/mastodon/locales/fr.json b/app/javascript/mastodon/locales/fr.json
index 1bc0e2722d..731c15e36c 100644
--- a/app/javascript/mastodon/locales/fr.json
+++ b/app/javascript/mastodon/locales/fr.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Personne n’a encore partagé ce message. Lorsque quelqu’un le fera, il apparaîtra ici.",
"status.redraft": "Supprimer et réécrire",
"status.remove_bookmark": "Retirer des marque-pages",
+ "status.remove_favourite": "Retirer des favoris",
"status.replied_in_thread": "A répondu dans un fil de discussion",
"status.replied_to": "En réponse à {name}",
"status.reply": "Répondre",
diff --git a/app/javascript/mastodon/locales/hu.json b/app/javascript/mastodon/locales/hu.json
index e215597f05..c07b7c48cb 100644
--- a/app/javascript/mastodon/locales/hu.json
+++ b/app/javascript/mastodon/locales/hu.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Senki sem tolta még meg ezt a bejegyzést. Ha valaki megteszi, itt fog megjelenni.",
"status.redraft": "Törlés és újraírás",
"status.remove_bookmark": "Könyvjelző eltávolítása",
+ "status.remove_favourite": "Eltávolítás a kedvencek közül",
"status.replied_in_thread": "Válaszolva a szálban",
"status.replied_to": "Megválaszolva {name} számára",
"status.reply": "Válasz",
diff --git a/app/javascript/mastodon/locales/it.json b/app/javascript/mastodon/locales/it.json
index a924169c83..09e6ea072a 100644
--- a/app/javascript/mastodon/locales/it.json
+++ b/app/javascript/mastodon/locales/it.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Ancora nessuno ha rebloggato questo post. Quando qualcuno lo farà, apparirà qui.",
"status.redraft": "Elimina e riscrivi",
"status.remove_bookmark": "Rimuovi segnalibro",
+ "status.remove_favourite": "Rimuovi dai preferiti",
"status.replied_in_thread": "Ha risposto nella discussione",
"status.replied_to": "Risposta a {name}",
"status.reply": "Rispondi",
diff --git a/app/javascript/mastodon/locales/lt.json b/app/javascript/mastodon/locales/lt.json
index 1d67b47b42..d83c7fae14 100644
--- a/app/javascript/mastodon/locales/lt.json
+++ b/app/javascript/mastodon/locales/lt.json
@@ -821,6 +821,7 @@
"status.reblogs.empty": "Šio įrašo dar niekas nepakėlė. Kai kas nors tai padarys, jie bus rodomi čia.",
"status.redraft": "Ištrinti ir parengti iš naujo",
"status.remove_bookmark": "Pašalinti žymę",
+ "status.remove_favourite": "Šalinti iš mėgstamų",
"status.replied_in_thread": "Atsakyta gijoje",
"status.replied_to": "Atsakyta į {name}",
"status.reply": "Atsakyti",
diff --git a/app/javascript/mastodon/locales/nl.json b/app/javascript/mastodon/locales/nl.json
index 051ecb00a0..c99c92eceb 100644
--- a/app/javascript/mastodon/locales/nl.json
+++ b/app/javascript/mastodon/locales/nl.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Niemand heeft dit bericht nog geboost. Wanneer iemand dit doet, valt dat hier te zien.",
"status.redraft": "Verwijderen en herschrijven",
"status.remove_bookmark": "Bladwijzer verwijderen",
+ "status.remove_favourite": "Verwijderen uit favorieten",
"status.replied_in_thread": "Reageerde in gesprek",
"status.replied_to": "Reageerde op {name}",
"status.reply": "Reageren",
diff --git a/app/javascript/mastodon/locales/ro.json b/app/javascript/mastodon/locales/ro.json
index 76c63d1a63..3d8bff2ed1 100644
--- a/app/javascript/mastodon/locales/ro.json
+++ b/app/javascript/mastodon/locales/ro.json
@@ -11,6 +11,7 @@
"about.not_available": "Această informație nu a fost pusă la dispoziție pe acest server.",
"about.powered_by": "Media socială descentralizată furnizată de {mastodon}",
"about.rules": "Reguli server",
+ "account.account_note_header": "Notă personală",
"account.add_or_remove_from_list": "Adaugă sau elimină din liste",
"account.badges.bot": "Robot",
"account.badges.group": "Grup",
@@ -29,11 +30,13 @@
"account.featured_tags.last_status_at": "Ultima postare pe {date}",
"account.featured_tags.last_status_never": "Fără postări",
"account.featured_tags.title": "Haștagurile recomandate de {name}",
- "account.follow": "Abonează-te",
+ "account.follow": "Urmărește",
"account.follow_back": "Urmăreşte înapoi",
"account.followers": "Urmăritori",
"account.followers.empty": "Acest utilizator nu are încă urmăritori.",
+ "account.followers_counter": "{count, plural, one {{counter} urmăritor} few {{counter} urmăritori} other {{counter} urmăritori}}",
"account.following": "Urmăriți",
+ "account.following_counter": "{count, plural, one {{counter} urmărit} few {{counter} urmărit} other {{counter} urmărit}}",
"account.follows.empty": "Momentan acest utilizator nu are niciun abonament.",
"account.go_to_profile": "Mergi la profil",
"account.hide_reblogs": "Ascunde distribuirile de la @{name}",
@@ -49,6 +52,7 @@
"account.mute_notifications_short": "Amuțește notificările",
"account.mute_short": "Ignoră",
"account.muted": "Pus pe silențios",
+ "account.mutual": "Mutual",
"account.no_bio": "Nicio descriere furnizată.",
"account.open_original_page": "Deschide pagina originală",
"account.posts": "Postări",
@@ -58,12 +62,14 @@
"account.requested_follow": "{name} A cerut să vă urmărească",
"account.share": "Distribuie profilul lui @{name}",
"account.show_reblogs": "Afișează distribuirile de la @{name}",
+ "account.statuses_counter": "{count, plural, one {{counter} postare} few {{counter} postări} other {{counter} postări}}",
"account.unblock": "Deblochează pe @{name}",
"account.unblock_domain": "Deblochează domeniul {domain}",
"account.unblock_short": "Deblochează",
"account.unendorse": "Nu promova pe profil",
"account.unfollow": "Nu mai urmări",
"account.unmute": "Nu mai ignora pe @{name}",
+ "account.unmute_notifications_short": "Dezamuțire notificări",
"account.unmute_short": "Reafișare",
"account_note.placeholder": "Click to add a note",
"admin.dashboard.daily_retention": "Rata de retenţie a utilizatorului pe zi după înregistrare",
@@ -71,12 +77,29 @@
"admin.dashboard.retention.average": "În medie",
"admin.dashboard.retention.cohort": "Înregistrări lunar",
"admin.dashboard.retention.cohort_size": "Utilizatori noi",
+ "admin.impact_report.instance_followers": "Urmăritori pe care utilizatorii noștri i-ar pierde",
+ "admin.impact_report.instance_follows": "Urmăritori pe care utilizatorii lor i-ar pierde",
"admin.impact_report.title": "Rezumatul impactului",
"alert.rate_limited.message": "Vă rugăm să reîncercați după {retry_time, time, medium}.",
"alert.rate_limited.title": "Debit limitat",
"alert.unexpected.message": "A apărut o eroare neașteptată.",
"alert.unexpected.title": "Ups!",
+ "alt_text_badge.title": "Text alternativ",
"announcement.announcement": "Anunț",
+ "annual_report.summary.archetype.lurker": "Pânditorul",
+ "annual_report.summary.archetype.oracle": "Oracolul",
+ "annual_report.summary.archetype.pollster": "Sondatorul",
+ "annual_report.summary.archetype.replier": "Fluturele social",
+ "annual_report.summary.followers.followers": "urmăritori",
+ "annual_report.summary.followers.total": "{count} total",
+ "annual_report.summary.here_it_is": "Iată rezumatul dvs. al anului {year}:",
+ "annual_report.summary.highlighted_post.by_favourites": "cea mai favorizată postare",
+ "annual_report.summary.highlighted_post.by_reblogs": "cea mai boostată postare",
+ "annual_report.summary.highlighted_post.by_replies": "postarea cu cele mai multe răspunsuri",
+ "annual_report.summary.most_used_app.most_used_app": "cea mai utilizată aplicație",
+ "annual_report.summary.most_used_hashtag.most_used_hashtag": "cel mai utilizat hashtag",
+ "annual_report.summary.most_used_hashtag.none": "Niciunul",
+ "annual_report.summary.new_posts.new_posts": "postări noi",
"attachments_list.unprocessed": "(neprocesate)",
"audio.hide": "Ascunde audio",
"boost_modal.combo": "Poți apăsa {combo} pentru a sări peste asta data viitoare",
diff --git a/app/javascript/mastodon/locales/sq.json b/app/javascript/mastodon/locales/sq.json
index b13402afa4..8bf529e0d4 100644
--- a/app/javascript/mastodon/locales/sq.json
+++ b/app/javascript/mastodon/locales/sq.json
@@ -831,6 +831,7 @@
"status.reblogs.empty": "Këtë mesazh s’e ka përforcuar njeri deri tani. Kur ta bëjë dikush, kjo do të duket këtu.",
"status.redraft": "Fshijeni & rihartojeni",
"status.remove_bookmark": "Hiqe faqerojtësin",
+ "status.remove_favourite": "Hiqe nga të parapëlqyerat",
"status.replied_in_thread": "U përgjigj te rrjedha",
"status.replied_to": "Iu përgjigj {name}",
"status.reply": "Përgjigjuni",
diff --git a/app/javascript/mastodon/locales/tr.json b/app/javascript/mastodon/locales/tr.json
index 787f9bfb4e..d57bf5e22f 100644
--- a/app/javascript/mastodon/locales/tr.json
+++ b/app/javascript/mastodon/locales/tr.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "Henüz hiç kimse bu gönderiyi yeniden paylaşmadı. Herhangi bir kullanıcı yeniden paylaştığında burada görüntülenecek.",
"status.redraft": "Sil,Düzenle ve yeniden-paylaş",
"status.remove_bookmark": "Yer işaretini kaldır",
+ "status.remove_favourite": "Favorilerden kaldır",
"status.replied_in_thread": "Akışta yanıtlandı",
"status.replied_to": "{name} kullanıcısına yanıt verdi",
"status.reply": "Yanıtla",
diff --git a/app/javascript/mastodon/locales/uk.json b/app/javascript/mastodon/locales/uk.json
index 830b6fa107..9d20c27fd0 100644
--- a/app/javascript/mastodon/locales/uk.json
+++ b/app/javascript/mastodon/locales/uk.json
@@ -802,6 +802,7 @@
"status.reblogs.empty": "Ніхто ще не поширив цей допис. Коли хтось це зроблять, вони будуть зображені тут.",
"status.redraft": "Видалити та виправити",
"status.remove_bookmark": "Видалити закладку",
+ "status.remove_favourite": "Видалити з улюблених",
"status.replied_in_thread": "Відповідь у потоці",
"status.replied_to": "Відповідь для {name}",
"status.reply": "Відповісти",
diff --git a/app/javascript/mastodon/locales/zh-CN.json b/app/javascript/mastodon/locales/zh-CN.json
index 954ec1472d..3e4530f44b 100644
--- a/app/javascript/mastodon/locales/zh-CN.json
+++ b/app/javascript/mastodon/locales/zh-CN.json
@@ -836,6 +836,7 @@
"status.reblogs.empty": "还没有人转嘟过此条嘟文。转嘟此嘟文的人会显示在这里。",
"status.redraft": "删除并重新编辑",
"status.remove_bookmark": "取消收藏",
+ "status.remove_favourite": "从喜欢列表中移除",
"status.replied_in_thread": "回复嘟文串",
"status.replied_to": "回复 {name}",
"status.reply": "回复",
diff --git a/app/javascript/mastodon/locales/zh-TW.json b/app/javascript/mastodon/locales/zh-TW.json
index ee7fca08ce..05f23a43ea 100644
--- a/app/javascript/mastodon/locales/zh-TW.json
+++ b/app/javascript/mastodon/locales/zh-TW.json
@@ -835,7 +835,8 @@
"status.reblogs": "{count, plural, other {則轉嘟}}",
"status.reblogs.empty": "還沒有人轉嘟過這則嘟文。當有人轉嘟時,它將於此顯示。",
"status.redraft": "刪除並重新編輯",
- "status.remove_bookmark": "移除書籤",
+ "status.remove_bookmark": "自書籤中移除",
+ "status.remove_favourite": "自最愛中移除",
"status.replied_in_thread": "於討論串中回覆",
"status.replied_to": "回覆 {name}",
"status.reply": "回覆",
diff --git a/config/locales/activerecord.et.yml b/config/locales/activerecord.et.yml
index 7af2c362db..520e97ffb4 100644
--- a/config/locales/activerecord.et.yml
+++ b/config/locales/activerecord.et.yml
@@ -39,6 +39,11 @@ et:
attributes:
data:
malformed: on vigasel kujul
+ list_account:
+ attributes:
+ account_id:
+ taken: on juba loetelus
+ must_be_following: peab olema jälgitav konto
status:
attributes:
reblog:
diff --git a/config/locales/activerecord.eu.yml b/config/locales/activerecord.eu.yml
index 6e388b4a55..a2458ceb41 100644
--- a/config/locales/activerecord.eu.yml
+++ b/config/locales/activerecord.eu.yml
@@ -15,6 +15,11 @@ eu:
user/invite_request:
text: Arrazoia
errors:
+ attributes:
+ domain:
+ invalid: ez da domeinu izen baliogarria
+ messages:
+ invalid_domain_on_line: "%{value} ez da domeinu izen baliogarria"
models:
account:
attributes:
diff --git a/config/locales/doorkeeper.et.yml b/config/locales/doorkeeper.et.yml
index fb135b1f96..b21afa9a79 100644
--- a/config/locales/doorkeeper.et.yml
+++ b/config/locales/doorkeeper.et.yml
@@ -132,7 +132,7 @@ et:
filters: Filtrid
follow: Jälgitavad, Vaigistatud ja Blokeeritud
follows: Jälgimised
- lists: Nimekirjad
+ lists: Loetelud
media: Lisatud meedia
mutes: Vaigistused
notifications: Teavitused
@@ -176,7 +176,7 @@ et:
read:favourites: näha sinu lemmikuid
read:filters: näha su filtreid
read:follows: näha su jälgimisi
- read:lists: näha su nimekirju
+ read:lists: näha su loetelusid
read:mutes: näha su vaigistusi
read:notifications: näha teateid
read:reports: näha teavitusi
@@ -190,7 +190,7 @@ et:
write:favourites: lisada postitusi lemmikuks
write:filters: luua filtreid
write:follows: jälgida inimesi
- write:lists: luua nimekirju
+ write:lists: luua loetelusid
write:media: üles laadida meediafaile
write:mutes: vaigista inimesi ja vestluseid
write:notifications: tühjendada teateid
diff --git a/config/locales/et.yml b/config/locales/et.yml
index 2f182d08b2..5d83333da8 100644
--- a/config/locales/et.yml
+++ b/config/locales/et.yml
@@ -335,7 +335,7 @@ et:
enabled_msg: Selle emotikoni lubamine õnnestus
image_hint: PNG või GIF suurusega kuni %{size}
list: Loend
- listed: Nimekirjastatud
+ listed: Loetletud
new:
title: Lisa uus emotikon
no_emoji_selected: Emotikone ei muudetud, kuna ühtegi polnud valitud
@@ -345,8 +345,8 @@ et:
shortcode_hint: Vähemalt 2 tähemärki, ainult tähted, numbrid ja alakriipsud
title: Emotikonid
uncategorized: Kategoriseerimata
- unlist: Kirjendamata
- unlisted: Kirjendamata
+ unlist: Loetlemata
+ unlisted: Loetlemata
update_failed_msg: Ei saanud seda emotikoni uuendada
updated_msg: Emotikoni uuendamine õnnestus!
upload: Lae üles
@@ -828,12 +828,17 @@ et:
media:
title: Meedia
metadata: Metaandmed
+ no_history: Seda postitust pole muudetud
no_status_selected: Ühtegi postitust ei muudetud, sest ühtegi polnud valitud
open: Ava postitus
original_status: Algne postitus
reblogs: Jagamised
+ replied_to_html: Vastatud %{acct_link}
status_changed: Muudetud postitus
+ status_title: Postitajaks @%{name}
+ title: Postitus kontolt - @%{name}
trending: Populaarne
+ view_publicly: Nähtav avalikult
visibility: Nähtavus
with_media: Meediaga
strikes:
@@ -910,6 +915,19 @@ et:
search: Otsi
title: Märksõnad
updated_msg: Sildi sätted edukalt uuendatud
+ terms_of_service:
+ back: Tagasi teenuse tingimustesse
+ changelog: Mis on muutunud
+ create: Kasuta enda oma
+ current: Praegune
+ draft: Mustand
+ generate: Kasuta malli
+ generates:
+ action: Genereeri
+ chance_to_review_html: "Loodud teenusetingimusi ei avaldata automaatselt. Sul on võimalus tulemused üle vaadata. Palun täida vajalikud andmed, et jätkata."
+ explanation_html: Esitatud teenusetingimuste näidis on mõeldud ainult teavitamise eesmärgil ja seda ei tohiks tõlgendada kui juriidilist nõuannet mis tahes küsimuses. Palun konsulteeri olukorra ja konkreetsete juriidiliste küsimuste osas oma õigusnõustajaga.
+ title: Teenuse tingimuste seadistamine
+ history: Ajalugu
title: Administreerimine
trends:
allow: Luba
@@ -1275,7 +1293,7 @@ et:
bookmarks: Järjehoidjad
csv: CSV
domain_blocks: Domeeni blokeeringud
- lists: Nimekirjad
+ lists: Loetelud
mutes: Oled vaigistanud
storage: Meedia hoidla
featured_tags:
@@ -1776,7 +1794,7 @@ et:
private_long: Näevad ainult jälgijad
public: Avalik
public_long: Postitused on kõigile näha
- unlisted: Kirjendamata
+ unlisted: Loetlemata
unlisted_long: Kõigile näha, kuid ei näidata avalikel ajajoontel
statuses_cleanup:
enabled: Vanade postituste automaatne kustutamine
diff --git a/config/locales/simple_form.et.yml b/config/locales/simple_form.et.yml
index 690661cd49..2f421b97b5 100644
--- a/config/locales/simple_form.et.yml
+++ b/config/locales/simple_form.et.yml
@@ -128,6 +128,9 @@ et:
show_application: Sa saad sõltumata sellest vaadata, milline äpp su postituse postitas.
tag:
name: Saad muuta ainult tähtede suurtähelisust, näiteks selleks, et muuta seda loetavamaks
+ terms_of_service_generator:
+ dmca_address: USA operaatorite puhul kasuta DMCA määratud esindajate kataloogis registreeritud aadressi. Postkastide loetelu on saadaval otsese taotluse korral. Kasuta DMCA määratud esindaja postkastist loobumise taotlust, et saata e-kiri autoriõiguse ametile ja kirjeldada, et oled kodus asuv sisu moderaator, kes kardab kättemaksu või kättemaksu oma tegevuse eest ja vajab postkasti, et eemaldada oma kodune aadress avalikust nähtavusest.
+ jurisdiction: Nimeta riik, kus elab see, kes arveid maksab. Kui tegemist on äriühingu või muu üksusega, märgi riik, kus see on asutatud, ning vajaduse korral linn, piirkond, territoorium või osariik.
user:
chosen_languages: Keelte valimisel näidatakse avalikel ajajoontel ainult neis keeltes postitusi
role: Rollid määravad, millised õigused kasutajal on.
diff --git a/spec/controllers/admin/account_actions_controller_spec.rb b/spec/controllers/admin/account_actions_controller_spec.rb
index d513b3d4a0..fabe5cef4d 100644
--- a/spec/controllers/admin/account_actions_controller_spec.rb
+++ b/spec/controllers/admin/account_actions_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::AccountActionsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/accounts_controller_spec.rb b/spec/controllers/admin/accounts_controller_spec.rb
index a182300106..72ca2275cf 100644
--- a/spec/controllers/admin/accounts_controller_spec.rb
+++ b/spec/controllers/admin/accounts_controller_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Admin::AccountsController do
before { sign_in current_user, scope: :user }
describe 'GET #index' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
let(:params) do
{
origin: 'local',
@@ -53,7 +53,7 @@ RSpec.describe Admin::AccountsController do
end
describe 'GET #show' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
describe 'account moderation notes' do
let(:account) { Fabricate(:account) }
diff --git a/spec/controllers/admin/action_logs_controller_spec.rb b/spec/controllers/admin/action_logs_controller_spec.rb
index 3daf260672..d3108e8055 100644
--- a/spec/controllers/admin/action_logs_controller_spec.rb
+++ b/spec/controllers/admin/action_logs_controller_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe Admin::ActionLogsController do
describe 'GET #index' do
it 'returns 200' do
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin'))
+ sign_in Fabricate(:admin_user)
get :index, params: { page: 1 }
expect(response).to have_http_status(200)
diff --git a/spec/controllers/admin/base_controller_spec.rb b/spec/controllers/admin/base_controller_spec.rb
index 8b8b7fe63d..6e78ccb3b1 100644
--- a/spec/controllers/admin/base_controller_spec.rb
+++ b/spec/controllers/admin/base_controller_spec.rb
@@ -20,7 +20,7 @@ RSpec.describe Admin::BaseController do
it 'returns private cache control headers' do
routes.draw { get 'success' => 'admin/base#success' }
- sign_in(Fabricate(:user, role: UserRole.find_by(name: 'Moderator')))
+ sign_in(Fabricate(:moderator_user))
get :success
expect(response.headers['Cache-Control']).to include('private, no-store')
@@ -28,14 +28,14 @@ RSpec.describe Admin::BaseController do
it 'renders admin layout as a moderator' do
routes.draw { get 'success' => 'admin/base#success' }
- sign_in(Fabricate(:user, role: UserRole.find_by(name: 'Moderator')))
+ sign_in(Fabricate(:moderator_user))
get :success
expect(response).to render_template layout: 'admin'
end
it 'renders admin layout as an admin' do
routes.draw { get 'success' => 'admin/base#success' }
- sign_in(Fabricate(:user, role: UserRole.find_by(name: 'Admin')))
+ sign_in(Fabricate(:admin_user))
get :success
expect(response).to render_template layout: 'admin'
end
diff --git a/spec/controllers/admin/change_emails_controller_spec.rb b/spec/controllers/admin/change_emails_controller_spec.rb
index dd8a764b64..899106e54e 100644
--- a/spec/controllers/admin/change_emails_controller_spec.rb
+++ b/spec/controllers/admin/change_emails_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::ChangeEmailsController do
render_views
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:admin) { Fabricate(:admin_user) }
before do
sign_in admin
diff --git a/spec/controllers/admin/confirmations_controller_spec.rb b/spec/controllers/admin/confirmations_controller_spec.rb
index 59ea0121ca..22035d15e6 100644
--- a/spec/controllers/admin/confirmations_controller_spec.rb
+++ b/spec/controllers/admin/confirmations_controller_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Admin::ConfirmationsController do
render_views
before do
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
+ sign_in Fabricate(:admin_user), scope: :user
end
describe 'POST #create' do
diff --git a/spec/controllers/admin/dashboard_controller_spec.rb b/spec/controllers/admin/dashboard_controller_spec.rb
index 9177be4b6d..5a1ea848cc 100644
--- a/spec/controllers/admin/dashboard_controller_spec.rb
+++ b/spec/controllers/admin/dashboard_controller_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Admin::DashboardController do
render_views
describe 'GET #index' do
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Owner')) }
+ let(:user) { Fabricate(:owner_user) }
before do
stub_system_checks
diff --git a/spec/controllers/admin/disputes/appeals_controller_spec.rb b/spec/controllers/admin/disputes/appeals_controller_spec.rb
index 678ceee115..b67ee30f74 100644
--- a/spec/controllers/admin/disputes/appeals_controller_spec.rb
+++ b/spec/controllers/admin/disputes/appeals_controller_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe Admin::Disputes::AppealsController do
let(:appeal) { Fabricate(:appeal, strike: strike, account: target_account) }
describe 'GET #index' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before { appeal }
@@ -32,7 +32,7 @@ RSpec.describe Admin::Disputes::AppealsController do
describe 'POST #approve' do
subject { post :approve, params: { id: appeal.id } }
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
it 'redirects back to the strike page and notifies target account about approved appeal', :inline_jobs do
emails = capture_emails { subject }
@@ -56,7 +56,7 @@ RSpec.describe Admin::Disputes::AppealsController do
describe 'POST #reject' do
subject { post :reject, params: { id: appeal.id } }
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
it 'redirects back to the strike page and notifies target account about rejected appeal', :inline_jobs do
emails = capture_emails { subject }
diff --git a/spec/controllers/admin/domain_blocks_controller_spec.rb b/spec/controllers/admin/domain_blocks_controller_spec.rb
index a99ca6c641..4d48a0d9d3 100644
--- a/spec/controllers/admin/domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/domain_blocks_controller_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Admin::DomainBlocksController do
render_views
before do
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
+ sign_in Fabricate(:admin_user), scope: :user
end
describe 'GET #new' do
diff --git a/spec/controllers/admin/email_domain_blocks_controller_spec.rb b/spec/controllers/admin/email_domain_blocks_controller_spec.rb
index 4de3ef0f62..c7460c2110 100644
--- a/spec/controllers/admin/email_domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/email_domain_blocks_controller_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Admin::EmailDomainBlocksController do
render_views
before do
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
+ sign_in Fabricate(:admin_user), scope: :user
end
describe 'GET #index' do
diff --git a/spec/controllers/admin/export_domain_allows_controller_spec.rb b/spec/controllers/admin/export_domain_allows_controller_spec.rb
index 0a56394193..dcb1f55a99 100644
--- a/spec/controllers/admin/export_domain_allows_controller_spec.rb
+++ b/spec/controllers/admin/export_domain_allows_controller_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Admin::ExportDomainAllowsController do
render_views
before do
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
+ sign_in Fabricate(:admin_user), scope: :user
end
describe 'GET #new' do
diff --git a/spec/controllers/admin/export_domain_blocks_controller_spec.rb b/spec/controllers/admin/export_domain_blocks_controller_spec.rb
index 564f5a88c5..442f3e5a15 100644
--- a/spec/controllers/admin/export_domain_blocks_controller_spec.rb
+++ b/spec/controllers/admin/export_domain_blocks_controller_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe Admin::ExportDomainBlocksController do
render_views
before do
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
+ sign_in Fabricate(:admin_user), scope: :user
end
describe 'GET #new' do
diff --git a/spec/controllers/admin/follow_recommendations_controller_spec.rb b/spec/controllers/admin/follow_recommendations_controller_spec.rb
index d614f2ef43..82446cd467 100644
--- a/spec/controllers/admin/follow_recommendations_controller_spec.rb
+++ b/spec/controllers/admin/follow_recommendations_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::FollowRecommendationsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/instances_controller_spec.rb b/spec/controllers/admin/instances_controller_spec.rb
index 1e65373e1f..83655bafa0 100644
--- a/spec/controllers/admin/instances_controller_spec.rb
+++ b/spec/controllers/admin/instances_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::InstancesController do
render_views
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
let!(:account_popular_main) { Fabricate(:account, domain: 'popular') }
diff --git a/spec/controllers/admin/relationships_controller_spec.rb b/spec/controllers/admin/relationships_controller_spec.rb
index 214be7c7cd..1d300459f6 100644
--- a/spec/controllers/admin/relationships_controller_spec.rb
+++ b/spec/controllers/admin/relationships_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::RelationshipsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/reports/actions_controller_spec.rb b/spec/controllers/admin/reports/actions_controller_spec.rb
index 6185702c30..87a48a7a3a 100644
--- a/spec/controllers/admin/reports/actions_controller_spec.rb
+++ b/spec/controllers/admin/reports/actions_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::Reports::ActionsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/reports_controller_spec.rb b/spec/controllers/admin/reports_controller_spec.rb
index 1252ceb1f4..4012204de1 100644
--- a/spec/controllers/admin/reports_controller_spec.rb
+++ b/spec/controllers/admin/reports_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::ReportsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/settings/branding_controller_spec.rb b/spec/controllers/admin/settings/branding_controller_spec.rb
index 5e46910cc6..843021469e 100644
--- a/spec/controllers/admin/settings/branding_controller_spec.rb
+++ b/spec/controllers/admin/settings/branding_controller_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Admin::Settings::BrandingController do
describe 'When signed in as an admin' do
before do
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
+ sign_in Fabricate(:admin_user), scope: :user
end
describe 'PUT #update' do
diff --git a/spec/controllers/admin/site_uploads_controller_spec.rb b/spec/controllers/admin/site_uploads_controller_spec.rb
index 9c65c63b78..1fe5903498 100644
--- a/spec/controllers/admin/site_uploads_controller_spec.rb
+++ b/spec/controllers/admin/site_uploads_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::SiteUploadsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/statuses_controller_spec.rb b/spec/controllers/admin/statuses_controller_spec.rb
index e6053a6e8a..2809c8ec3f 100644
--- a/spec/controllers/admin/statuses_controller_spec.rb
+++ b/spec/controllers/admin/statuses_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::StatusesController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
let(:account) { Fabricate(:account) }
let!(:status) { Fabricate(:status, account: account) }
let(:media_attached_status) { Fabricate(:status, account: account, sensitive: !sensitive) }
diff --git a/spec/controllers/admin/terms_of_service/distributions_controller_spec.rb b/spec/controllers/admin/terms_of_service/distributions_controller_spec.rb
index b6d436a26f..63431c1336 100644
--- a/spec/controllers/admin/terms_of_service/distributions_controller_spec.rb
+++ b/spec/controllers/admin/terms_of_service/distributions_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::TermsOfService::DistributionsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
let(:terms_of_service) { Fabricate(:terms_of_service, notification_sent_at: nil) }
before do
diff --git a/spec/controllers/admin/terms_of_service/drafts_controller_spec.rb b/spec/controllers/admin/terms_of_service/drafts_controller_spec.rb
index 6c19b973d0..0a9c6e6b67 100644
--- a/spec/controllers/admin/terms_of_service/drafts_controller_spec.rb
+++ b/spec/controllers/admin/terms_of_service/drafts_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::TermsOfService::DraftsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/terms_of_service/generates_controller_spec.rb b/spec/controllers/admin/terms_of_service/generates_controller_spec.rb
index 2f85fbc25f..c1fc7faef9 100644
--- a/spec/controllers/admin/terms_of_service/generates_controller_spec.rb
+++ b/spec/controllers/admin/terms_of_service/generates_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::TermsOfService::GeneratesController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/terms_of_service/histories_controller_spec.rb b/spec/controllers/admin/terms_of_service/histories_controller_spec.rb
index d11ea2cd33..8c2c3a3de3 100644
--- a/spec/controllers/admin/terms_of_service/histories_controller_spec.rb
+++ b/spec/controllers/admin/terms_of_service/histories_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::TermsOfService::HistoriesController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/terms_of_service/previews_controller_spec.rb b/spec/controllers/admin/terms_of_service/previews_controller_spec.rb
index 5d923c9f30..3878bb4b6f 100644
--- a/spec/controllers/admin/terms_of_service/previews_controller_spec.rb
+++ b/spec/controllers/admin/terms_of_service/previews_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::TermsOfService::PreviewsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
let(:terms_of_service) { Fabricate(:terms_of_service, notification_sent_at: nil) }
before do
diff --git a/spec/controllers/admin/terms_of_service/tests_controller_spec.rb b/spec/controllers/admin/terms_of_service/tests_controller_spec.rb
index 281c4d28c5..777f699448 100644
--- a/spec/controllers/admin/terms_of_service/tests_controller_spec.rb
+++ b/spec/controllers/admin/terms_of_service/tests_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::TermsOfService::TestsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
let(:terms_of_service) { Fabricate(:terms_of_service, notification_sent_at: nil) }
before do
diff --git a/spec/controllers/admin/terms_of_service_controller_spec.rb b/spec/controllers/admin/terms_of_service_controller_spec.rb
index b7fdb90446..feefd312e3 100644
--- a/spec/controllers/admin/terms_of_service_controller_spec.rb
+++ b/spec/controllers/admin/terms_of_service_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::TermsOfServiceController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb b/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb
index ce62a13db6..aadf002dd6 100644
--- a/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb
+++ b/spec/controllers/admin/trends/links/preview_card_providers_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::Trends::Links::PreviewCardProvidersController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/trends/links_controller_spec.rb b/spec/controllers/admin/trends/links_controller_spec.rb
index 984f3007c2..cd2cf6b852 100644
--- a/spec/controllers/admin/trends/links_controller_spec.rb
+++ b/spec/controllers/admin/trends/links_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::Trends::LinksController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/trends/statuses_controller_spec.rb b/spec/controllers/admin/trends/statuses_controller_spec.rb
index eecf4ab4f2..6570340b2d 100644
--- a/spec/controllers/admin/trends/statuses_controller_spec.rb
+++ b/spec/controllers/admin/trends/statuses_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::Trends::StatusesController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/trends/tags_controller_spec.rb b/spec/controllers/admin/trends/tags_controller_spec.rb
index 51ad1860c8..83ea23ed21 100644
--- a/spec/controllers/admin/trends/tags_controller_spec.rb
+++ b/spec/controllers/admin/trends/tags_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::Trends::TagsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb b/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb
index 1f0a6ac34d..39af2ca914 100644
--- a/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb
+++ b/spec/controllers/admin/users/two_factor_authentications_controller_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe Admin::Users::TwoFactorAuthenticationsController do
let(:user) { Fabricate(:user) }
before do
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
+ sign_in Fabricate(:admin_user), scope: :user
end
describe 'DELETE #destroy' do
diff --git a/spec/controllers/admin/warning_presets_controller_spec.rb b/spec/controllers/admin/warning_presets_controller_spec.rb
index 4171bbad82..d416b9c3cf 100644
--- a/spec/controllers/admin/warning_presets_controller_spec.rb
+++ b/spec/controllers/admin/warning_presets_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::WarningPresetsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/controllers/admin/webhooks/secrets_controller_spec.rb b/spec/controllers/admin/webhooks/secrets_controller_spec.rb
index 61ae8cdaa5..da3d4f1438 100644
--- a/spec/controllers/admin/webhooks/secrets_controller_spec.rb
+++ b/spec/controllers/admin/webhooks/secrets_controller_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe Admin::Webhooks::SecretsController do
render_views
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before do
sign_in user, scope: :user
diff --git a/spec/fabricators/user_fabricator.rb b/spec/fabricators/user_fabricator.rb
index 0df7caea60..104d7f9931 100644
--- a/spec/fabricators/user_fabricator.rb
+++ b/spec/fabricators/user_fabricator.rb
@@ -13,3 +13,15 @@ Fabricator(:user) do
current_sign_in_at { Time.zone.now }
agreement true
end
+
+Fabricator(:admin_user, from: :user) do
+ role UserRole.find_by(name: 'Admin')
+end
+
+Fabricator(:moderator_user, from: :user) do
+ role UserRole.find_by(name: 'Moderator')
+end
+
+Fabricator(:owner_user, from: :user) do
+ role UserRole.find_by(name: 'Owner')
+end
diff --git a/spec/models/admin/account_action_spec.rb b/spec/models/admin/account_action_spec.rb
index 49bc2b4a91..6032594850 100644
--- a/spec/models/admin/account_action_spec.rb
+++ b/spec/models/admin/account_action_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Admin::AccountAction do
describe '#save!' do
subject { account_action.save! }
- let(:account) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:account) { Fabricate(:admin_user).account }
let(:target_account) { Fabricate(:account) }
let(:type) { 'disable' }
diff --git a/spec/models/form/account_batch_spec.rb b/spec/models/form/account_batch_spec.rb
index 26fb1b953a..8db9a2a254 100644
--- a/spec/models/form/account_batch_spec.rb
+++ b/spec/models/form/account_batch_spec.rb
@@ -8,7 +8,7 @@ RSpec.describe Form::AccountBatch do
describe '#save' do
subject { account_batch.save }
- let(:account) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:account) { Fabricate(:admin_user).account }
let(:account_ids) { [] }
let(:query) { Account.none }
diff --git a/spec/models/form/custom_emoji_batch_spec.rb b/spec/models/form/custom_emoji_batch_spec.rb
index 180c6abd23..ca9740de3e 100644
--- a/spec/models/form/custom_emoji_batch_spec.rb
+++ b/spec/models/form/custom_emoji_batch_spec.rb
@@ -7,7 +7,7 @@ RSpec.describe Form::CustomEmojiBatch do
subject { described_class.new({ current_account: account }.merge(options)) }
let(:options) { {} }
- let(:account) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:account) { Fabricate(:admin_user).account }
context 'with empty custom_emoji_ids' do
let(:options) { { custom_emoji_ids: [] } }
diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb
index f39b80c942..08d410bb16 100644
--- a/spec/models/user_spec.rb
+++ b/spec/models/user_spec.rb
@@ -601,7 +601,7 @@ RSpec.describe User do
end
describe '.those_who_can' do
- before { Fabricate(:user, role: UserRole.find_by(name: 'Moderator')) }
+ before { Fabricate(:moderator_user) }
context 'when there are not any user roles' do
before { UserRole.destroy_all }
@@ -618,7 +618,7 @@ RSpec.describe User do
end
context 'when there are users with roles' do
- let!(:admin_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let!(:admin_user) { Fabricate(:admin_user) }
it 'returns the users with the role' do
expect(described_class.those_who_can(:manage_blocks)).to eq([admin_user])
diff --git a/spec/models/webhook_spec.rb b/spec/models/webhook_spec.rb
index 18a6047dd0..59b4212d62 100644
--- a/spec/models/webhook_spec.rb
+++ b/spec/models/webhook_spec.rb
@@ -18,7 +18,7 @@ RSpec.describe Webhook do
subject { Fabricate.build :webhook, current_account: account }
context 'with account that has permissions' do
- let(:account) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:account) { Fabricate(:admin_user).account }
it { is_expected.to allow_values(%w(account.created)).for(:events) }
end
diff --git a/spec/policies/account_moderation_note_policy_spec.rb b/spec/policies/account_moderation_note_policy_spec.rb
index 8b33a71012..2a9cdabaa2 100644
--- a/spec/policies/account_moderation_note_policy_spec.rb
+++ b/spec/policies/account_moderation_note_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe AccountModerationNotePolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :create? do
diff --git a/spec/policies/account_policy_spec.rb b/spec/policies/account_policy_spec.rb
index 75724e831b..8b2edb15b0 100644
--- a/spec/policies/account_policy_spec.rb
+++ b/spec/policies/account_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe AccountPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
let(:alice) { Fabricate(:account) }
@@ -70,7 +70,7 @@ RSpec.describe AccountPolicy do
end
permissions :suspend?, :silence? do
- let(:staff) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:staff) { Fabricate(:admin_user).account }
context 'when staff' do
context 'when record is staff' do
@@ -94,7 +94,7 @@ RSpec.describe AccountPolicy do
end
permissions :memorialize? do
- let(:other_admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:other_admin) { Fabricate(:admin_user).account }
context 'when admin' do
context 'when record is admin' do
diff --git a/spec/policies/account_warning_policy_spec.rb b/spec/policies/account_warning_policy_spec.rb
index 9abc9d35d6..75142e2071 100644
--- a/spec/policies/account_warning_policy_spec.rb
+++ b/spec/policies/account_warning_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe AccountWarningPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:account) { Fabricate(:account) }
permissions :show? do
diff --git a/spec/policies/account_warning_preset_policy_spec.rb b/spec/policies/account_warning_preset_policy_spec.rb
index 33f2fb1187..e8223ab1c7 100644
--- a/spec/policies/account_warning_preset_policy_spec.rb
+++ b/spec/policies/account_warning_preset_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe AccountWarningPresetPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :create?, :update?, :destroy? do
diff --git a/spec/policies/admin/status_policy_spec.rb b/spec/policies/admin/status_policy_spec.rb
index 4df29393e3..5f8285c562 100644
--- a/spec/policies/admin/status_policy_spec.rb
+++ b/spec/policies/admin/status_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe Admin::StatusPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
let(:status) { Fabricate(:status, visibility: status_visibility) }
let(:status_visibility) { :public }
diff --git a/spec/policies/announcement_policy_spec.rb b/spec/policies/announcement_policy_spec.rb
index ab0c1dbaf5..2fec34f8e4 100644
--- a/spec/policies/announcement_policy_spec.rb
+++ b/spec/policies/announcement_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe AnnouncementPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :create?, :update?, :destroy? do
diff --git a/spec/policies/appeal_policy_spec.rb b/spec/policies/appeal_policy_spec.rb
index cdb93bf56c..e3e1d62ba7 100644
--- a/spec/policies/appeal_policy_spec.rb
+++ b/spec/policies/appeal_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe AppealPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
let(:appeal) { Fabricate(:appeal) }
diff --git a/spec/policies/audit_log_policy_spec.rb b/spec/policies/audit_log_policy_spec.rb
index d9d9359433..b1769eb487 100644
--- a/spec/policies/audit_log_policy_spec.rb
+++ b/spec/policies/audit_log_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe AuditLogPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:account) { Fabricate(:account) }
permissions :index? do
diff --git a/spec/policies/canonical_email_block_policy_spec.rb b/spec/policies/canonical_email_block_policy_spec.rb
index b253b439a6..bf9503dc5c 100644
--- a/spec/policies/canonical_email_block_policy_spec.rb
+++ b/spec/policies/canonical_email_block_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe CanonicalEmailBlockPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :show?, :test?, :create?, :destroy? do
diff --git a/spec/policies/custom_emoji_policy_spec.rb b/spec/policies/custom_emoji_policy_spec.rb
index 189885938c..9635da4496 100644
--- a/spec/policies/custom_emoji_policy_spec.rb
+++ b/spec/policies/custom_emoji_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe CustomEmojiPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :enable?, :disable? do
diff --git a/spec/policies/dashboard_policy_spec.rb b/spec/policies/dashboard_policy_spec.rb
index 90c71db381..711bea53ec 100644
--- a/spec/policies/dashboard_policy_spec.rb
+++ b/spec/policies/dashboard_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe DashboardPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:account) { Fabricate(:account) }
permissions :index? do
diff --git a/spec/policies/delivery_policy_spec.rb b/spec/policies/delivery_policy_spec.rb
index 8bc200159a..017a7f3c5e 100644
--- a/spec/policies/delivery_policy_spec.rb
+++ b/spec/policies/delivery_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe DeliveryPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :clear_delivery_errors?, :restart_delivery?, :stop_delivery? do
diff --git a/spec/policies/domain_allow_policy_spec.rb b/spec/policies/domain_allow_policy_spec.rb
index 1d285065b8..1e29c4144f 100644
--- a/spec/policies/domain_allow_policy_spec.rb
+++ b/spec/policies/domain_allow_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe DomainAllowPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :show?, :create?, :destroy? do
diff --git a/spec/policies/domain_block_policy_spec.rb b/spec/policies/domain_block_policy_spec.rb
index 7c77d1870d..04081c5c9b 100644
--- a/spec/policies/domain_block_policy_spec.rb
+++ b/spec/policies/domain_block_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe DomainBlockPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :show?, :create?, :destroy?, :update? do
diff --git a/spec/policies/email_domain_block_policy_spec.rb b/spec/policies/email_domain_block_policy_spec.rb
index e98d65a3c7..6428a2b442 100644
--- a/spec/policies/email_domain_block_policy_spec.rb
+++ b/spec/policies/email_domain_block_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe EmailDomainBlockPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :show?, :create?, :destroy? do
diff --git a/spec/policies/follow_recommendation_policy_spec.rb b/spec/policies/follow_recommendation_policy_spec.rb
index 665ed9b059..181f0ed11c 100644
--- a/spec/policies/follow_recommendation_policy_spec.rb
+++ b/spec/policies/follow_recommendation_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe FollowRecommendationPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :show?, :suppress?, :unsuppress? do
diff --git a/spec/policies/instance_policy_spec.rb b/spec/policies/instance_policy_spec.rb
index 6cdc738022..7ab843b83b 100644
--- a/spec/policies/instance_policy_spec.rb
+++ b/spec/policies/instance_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe InstancePolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :show?, :destroy? do
diff --git a/spec/policies/invite_policy_spec.rb b/spec/policies/invite_policy_spec.rb
index 3717a44999..bb3bddd4b8 100644
--- a/spec/policies/invite_policy_spec.rb
+++ b/spec/policies/invite_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe InvitePolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:user).account }
permissions :index? do
diff --git a/spec/policies/ip_block_policy_spec.rb b/spec/policies/ip_block_policy_spec.rb
index 33ea342c10..dcd9c19785 100644
--- a/spec/policies/ip_block_policy_spec.rb
+++ b/spec/policies/ip_block_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe IpBlockPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :show?, :create?, :update?, :destroy? do
diff --git a/spec/policies/preview_card_policy_spec.rb b/spec/policies/preview_card_policy_spec.rb
index d02a6016cd..75fcf7b373 100644
--- a/spec/policies/preview_card_policy_spec.rb
+++ b/spec/policies/preview_card_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe PreviewCardPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :review? do
diff --git a/spec/policies/preview_card_provider_policy_spec.rb b/spec/policies/preview_card_provider_policy_spec.rb
index 5e25b364a4..d3fbf44539 100644
--- a/spec/policies/preview_card_provider_policy_spec.rb
+++ b/spec/policies/preview_card_provider_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe PreviewCardProviderPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :review? do
diff --git a/spec/policies/relay_policy_spec.rb b/spec/policies/relay_policy_spec.rb
index 5983b2d2ff..8d5ed4997e 100644
--- a/spec/policies/relay_policy_spec.rb
+++ b/spec/policies/relay_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe RelayPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :update? do
diff --git a/spec/policies/report_note_policy_spec.rb b/spec/policies/report_note_policy_spec.rb
index 02317f763a..9f0c525a3c 100644
--- a/spec/policies/report_note_policy_spec.rb
+++ b/spec/policies/report_note_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe ReportNotePolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :create? do
diff --git a/spec/policies/report_policy_spec.rb b/spec/policies/report_policy_spec.rb
index 67f40b5188..20b91c5fd0 100644
--- a/spec/policies/report_policy_spec.rb
+++ b/spec/policies/report_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe ReportPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :update?, :index?, :show? do
diff --git a/spec/policies/rule_policy_spec.rb b/spec/policies/rule_policy_spec.rb
index 3086f30446..70ae3f9417 100644
--- a/spec/policies/rule_policy_spec.rb
+++ b/spec/policies/rule_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe RulePolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :create?, :update?, :destroy? do
diff --git a/spec/policies/settings_policy_spec.rb b/spec/policies/settings_policy_spec.rb
index 48821c706a..d11c3c1fa7 100644
--- a/spec/policies/settings_policy_spec.rb
+++ b/spec/policies/settings_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe SettingsPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :update?, :show?, :destroy? do
diff --git a/spec/policies/software_update_policy_spec.rb b/spec/policies/software_update_policy_spec.rb
index 2bda84cce9..ab067dd17e 100644
--- a/spec/policies/software_update_policy_spec.rb
+++ b/spec/policies/software_update_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe SoftwareUpdatePolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Owner')).account }
+ let(:admin) { Fabricate(:owner_user).account }
let(:john) { Fabricate(:account) }
permissions :index? do
diff --git a/spec/policies/status_policy_spec.rb b/spec/policies/status_policy_spec.rb
index eb2af75d92..6a1c40be07 100644
--- a/spec/policies/status_policy_spec.rb
+++ b/spec/policies/status_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe StatusPolicy, type: :model do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:admin) { Fabricate(:admin_user) }
let(:alice) { Fabricate(:account, username: 'alice') }
let(:bob) { Fabricate(:account, username: 'bob') }
let(:status) { Fabricate(:status, account: alice) }
diff --git a/spec/policies/tag_policy_spec.rb b/spec/policies/tag_policy_spec.rb
index 23166e4669..241f13dd3b 100644
--- a/spec/policies/tag_policy_spec.rb
+++ b/spec/policies/tag_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe TagPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :show?, :update?, :review? do
diff --git a/spec/policies/terms_of_service_policy_spec.rb b/spec/policies/terms_of_service_policy_spec.rb
index 18345d9fd0..0deab2fe9b 100644
--- a/spec/policies/terms_of_service_policy_spec.rb
+++ b/spec/policies/terms_of_service_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe TermsOfServicePolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :create? do
diff --git a/spec/policies/user_policy_spec.rb b/spec/policies/user_policy_spec.rb
index 11a166a24e..ba4e31189a 100644
--- a/spec/policies/user_policy_spec.rb
+++ b/spec/policies/user_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe UserPolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :reset_password?, :change_email? do
diff --git a/spec/policies/user_role_policy_spec.rb b/spec/policies/user_role_policy_spec.rb
index c48b345d68..7708dfea55 100644
--- a/spec/policies/user_role_policy_spec.rb
+++ b/spec/policies/user_role_policy_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe UserRolePolicy do
subject { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:account) { Fabricate(:account) }
permissions :index?, :create? do
diff --git a/spec/policies/webhook_policy_spec.rb b/spec/policies/webhook_policy_spec.rb
index 9899235d83..10b5968165 100644
--- a/spec/policies/webhook_policy_spec.rb
+++ b/spec/policies/webhook_policy_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe WebhookPolicy do
let(:policy) { described_class }
- let(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')).account }
+ let(:admin) { Fabricate(:admin_user).account }
let(:john) { Fabricate(:account) }
permissions :index?, :create? do
diff --git a/spec/requests/api/v1/admin/dimensions_spec.rb b/spec/requests/api/v1/admin/dimensions_spec.rb
index 81fb580ba7..3a4cd91716 100644
--- a/spec/requests/api/v1/admin/dimensions_spec.rb
+++ b/spec/requests/api/v1/admin/dimensions_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin Dimensions' do
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
let(:headers) { { 'Authorization' => "Bearer #{token.token}" } }
let(:account) { Fabricate(:account) }
diff --git a/spec/requests/api/v1/admin/measures_spec.rb b/spec/requests/api/v1/admin/measures_spec.rb
index 519b5cc7b3..b55cd0f1b2 100644
--- a/spec/requests/api/v1/admin/measures_spec.rb
+++ b/spec/requests/api/v1/admin/measures_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin Measures' do
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
let(:headers) { { 'Authorization' => "Bearer #{token.token}" } }
let(:account) { Fabricate(:account) }
diff --git a/spec/requests/api/v1/admin/retention_spec.rb b/spec/requests/api/v1/admin/retention_spec.rb
index e28bc2a94f..25e626e259 100644
--- a/spec/requests/api/v1/admin/retention_spec.rb
+++ b/spec/requests/api/v1/admin/retention_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin Retention' do
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
let(:token) { Fabricate(:accessible_access_token, resource_owner_id: user.id, scopes: scopes) }
let(:headers) { { 'Authorization' => "Bearer #{token.token}" } }
let(:account) { Fabricate(:account) }
diff --git a/spec/requests/api/v1/reports_spec.rb b/spec/requests/api/v1/reports_spec.rb
index 18b894bf63..1f113c649e 100644
--- a/spec/requests/api/v1/reports_spec.rb
+++ b/spec/requests/api/v1/reports_spec.rb
@@ -13,7 +13,7 @@ RSpec.describe 'Reports' do
post '/api/v1/reports', headers: headers, params: params
end
- let!(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let!(:admin) { Fabricate(:admin_user) }
let(:status) { Fabricate(:status) }
let(:target_account) { status.account }
let(:category) { 'other' }
diff --git a/spec/requests/cache_spec.rb b/spec/requests/cache_spec.rb
index 9cce241b38..2a52e4dea9 100644
--- a/spec/requests/cache_spec.rb
+++ b/spec/requests/cache_spec.rb
@@ -172,7 +172,7 @@ RSpec.describe 'Caching behavior' do
before_all do
alice = Fabricate(:account, username: 'alice')
- user = Fabricate(:user, email: 'user@host.example', role: UserRole.find_by(name: 'Moderator'))
+ user = Fabricate(:moderator_user, email: 'user@host.example')
status = Fabricate(:status, account: alice, id: 110_224_538_612_341_312)
Fabricate(:status, account: alice, id: 110_224_538_643_211_312, visibility: :private)
Fabricate(:invite, code: 'abcdef')
diff --git a/spec/services/appeal_service_spec.rb b/spec/services/appeal_service_spec.rb
index 6a47bb2cea..a4b1acf9cf 100644
--- a/spec/services/appeal_service_spec.rb
+++ b/spec/services/appeal_service_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe AppealService, :inline_jobs do
describe '#call' do
- let!(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let!(:admin) { Fabricate(:admin_user) }
context 'with an existing strike' do
let(:strike) { Fabricate(:account_warning) }
diff --git a/spec/services/software_update_check_service_spec.rb b/spec/services/software_update_check_service_spec.rb
index 637e1e26c5..73ffe6b899 100644
--- a/spec/services/software_update_check_service_spec.rb
+++ b/spec/services/software_update_check_service_spec.rb
@@ -9,7 +9,7 @@ RSpec.describe SoftwareUpdateCheckService do
let(:full_update_check_url) { "#{update_check_url}?version=#{Mastodon::Version.to_s.split('+')[0]}" }
let(:devops_role) { Fabricate(:user_role, name: 'DevOps', permissions: UserRole::FLAGS[:view_devops]) }
- let(:owner_user) { Fabricate(:user, role: UserRole.find_by(name: 'Owner')) }
+ let(:owner_user) { Fabricate(:owner_user) }
let(:old_devops_user) { Fabricate(:user) }
let(:none_user) { Fabricate(:user, role: devops_role) }
let(:patch_user) { Fabricate(:user, role: devops_role) }
diff --git a/spec/support/system_helpers.rb b/spec/support/system_helpers.rb
index 4cc1928701..18889844f8 100644
--- a/spec/support/system_helpers.rb
+++ b/spec/support/system_helpers.rb
@@ -2,7 +2,7 @@
module SystemHelpers
def admin_user
- Fabricate(:user, role: UserRole.find_by(name: 'Admin'))
+ Fabricate(:admin_user)
end
def submit_button
diff --git a/spec/system/admin/account_moderation_notes_spec.rb b/spec/system/admin/account_moderation_notes_spec.rb
index 5d195143c2..fa930cea2c 100644
--- a/spec/system/admin/account_moderation_notes_spec.rb
+++ b/spec/system/admin/account_moderation_notes_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::AccountModerationNotes' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
let(:target_account) { Fabricate(:account) }
before { sign_in current_user }
diff --git a/spec/system/admin/accounts_spec.rb b/spec/system/admin/accounts_spec.rb
index c21e01e4f3..30504ce5d7 100644
--- a/spec/system/admin/accounts_spec.rb
+++ b/spec/system/admin/accounts_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::Accounts' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before do
sign_in current_user
diff --git a/spec/system/admin/announcements_spec.rb b/spec/system/admin/announcements_spec.rb
index 87b7332639..65768eb18b 100644
--- a/spec/system/admin/announcements_spec.rb
+++ b/spec/system/admin/announcements_spec.rb
@@ -121,6 +121,6 @@ RSpec.describe 'Admin::Announcements' do
end
def admin_user
- Fabricate(:user, role: UserRole.find_by(name: 'Admin'))
+ Fabricate(:admin_user)
end
end
diff --git a/spec/system/admin/custom_emojis_spec.rb b/spec/system/admin/custom_emojis_spec.rb
index d597e30313..1d54aa4d5e 100644
--- a/spec/system/admin/custom_emojis_spec.rb
+++ b/spec/system/admin/custom_emojis_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::CustomEmojis' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before { sign_in current_user }
diff --git a/spec/system/admin/domain_allows_spec.rb b/spec/system/admin/domain_allows_spec.rb
index 1c462ff7cc..bacbb53eac 100644
--- a/spec/system/admin/domain_allows_spec.rb
+++ b/spec/system/admin/domain_allows_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::DomainAllows' do
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
let(:domain) { 'host.example' }
before do
diff --git a/spec/system/admin/domain_blocks_spec.rb b/spec/system/admin/domain_blocks_spec.rb
index f00d65dfe0..56a5d11984 100644
--- a/spec/system/admin/domain_blocks_spec.rb
+++ b/spec/system/admin/domain_blocks_spec.rb
@@ -5,7 +5,7 @@ require 'rails_helper'
RSpec.describe 'blocking domains through the moderation interface' do
before do
allow(DomainBlockWorker).to receive(:perform_async).and_return(true)
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')), scope: :user
+ sign_in Fabricate(:admin_user), scope: :user
end
context 'when silencing a new domain' do
diff --git a/spec/system/admin/email_domain_blocks_spec.rb b/spec/system/admin/email_domain_blocks_spec.rb
index a90bede827..acf5027eda 100644
--- a/spec/system/admin/email_domain_blocks_spec.rb
+++ b/spec/system/admin/email_domain_blocks_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::EmailDomainBlocks' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before do
sign_in current_user
diff --git a/spec/system/admin/invites_spec.rb b/spec/system/admin/invites_spec.rb
index f2cee626c6..cc1e4bae18 100644
--- a/spec/system/admin/invites_spec.rb
+++ b/spec/system/admin/invites_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe 'Admin Invites' do
describe 'Invite interaction' do
let!(:invite) { Fabricate(:invite, expires_at: nil) }
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before { sign_in user }
diff --git a/spec/system/admin/ip_blocks_spec.rb b/spec/system/admin/ip_blocks_spec.rb
index c101b8e1c6..8e8c8031c8 100644
--- a/spec/system/admin/ip_blocks_spec.rb
+++ b/spec/system/admin/ip_blocks_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::IpBlocks' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before { sign_in current_user }
diff --git a/spec/system/admin/relays_spec.rb b/spec/system/admin/relays_spec.rb
index 14d453576b..a5b92a4d0d 100644
--- a/spec/system/admin/relays_spec.rb
+++ b/spec/system/admin/relays_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe 'Admin Relays' do
describe 'Managing relays' do
- before { sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ before { sign_in Fabricate(:admin_user) }
describe 'Viewing relays' do
let!(:relay) { Fabricate :relay }
diff --git a/spec/system/admin/report_notes_spec.rb b/spec/system/admin/report_notes_spec.rb
index c80e600b31..143bc8ac7c 100644
--- a/spec/system/admin/report_notes_spec.rb
+++ b/spec/system/admin/report_notes_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin Report Notes' do
- let(:user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:user) { Fabricate(:admin_user) }
before { sign_in user }
diff --git a/spec/system/admin/reset_spec.rb b/spec/system/admin/reset_spec.rb
index d0f70a93f0..5cd0c048bb 100644
--- a/spec/system/admin/reset_spec.rb
+++ b/spec/system/admin/reset_spec.rb
@@ -28,7 +28,7 @@ RSpec.describe 'Admin::Reset' do
end
def admin_user
- Fabricate(:user, role: UserRole.find_by(name: 'Admin'))
+ Fabricate(:admin_user)
end
def submit_reset
diff --git a/spec/system/admin/rules_spec.rb b/spec/system/admin/rules_spec.rb
index 4718909ab0..a7eb3a0fce 100644
--- a/spec/system/admin/rules_spec.rb
+++ b/spec/system/admin/rules_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe 'Admin Rules' do
describe 'Managing rules' do
- before { sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ before { sign_in Fabricate(:admin_user) }
describe 'Viewing rules' do
let!(:rule) { Fabricate :rule, text: 'This is a rule' }
diff --git a/spec/system/admin/software_updates_spec.rb b/spec/system/admin/software_updates_spec.rb
index 77e9f16684..f49c5a3c87 100644
--- a/spec/system/admin/software_updates_spec.rb
+++ b/spec/system/admin/software_updates_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe 'finding software updates through the admin interface' do
before do
Fabricate(:software_update, version: '99.99.99', type: 'major', urgent: true, release_notes: 'https://github.com/mastodon/mastodon/releases/v99')
- sign_in Fabricate(:user, role: UserRole.find_by(name: 'Owner')), scope: :user
+ sign_in Fabricate(:owner_user), scope: :user
end
it 'shows a link to the software updates page, which links to release notes' do
diff --git a/spec/system/admin/statuses_spec.rb b/spec/system/admin/statuses_spec.rb
index bb76a2963d..998ffc89df 100644
--- a/spec/system/admin/statuses_spec.rb
+++ b/spec/system/admin/statuses_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::Statuses' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before do
sign_in current_user
diff --git a/spec/system/admin/tags_spec.rb b/spec/system/admin/tags_spec.rb
index a3eca80d13..91227f0ca7 100644
--- a/spec/system/admin/tags_spec.rb
+++ b/spec/system/admin/tags_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe 'Admin Tags' do
describe 'Tag interaction' do
let!(:tag) { Fabricate(:tag, name: 'test') }
- before { sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ before { sign_in Fabricate(:admin_user) }
it 'allows tags listing and editing' do
visit admin_tags_path
diff --git a/spec/system/admin/terms_of_service_spec.rb b/spec/system/admin/terms_of_service_spec.rb
index d6ee1469d2..0842138034 100644
--- a/spec/system/admin/terms_of_service_spec.rb
+++ b/spec/system/admin/terms_of_service_spec.rb
@@ -6,7 +6,7 @@ RSpec.describe 'Admin Terms of services' do
describe 'Viewing terms of services index page' do
let!(:terms) { Fabricate :terms_of_service, text: 'Test terms' }
- before { sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ before { sign_in Fabricate(:admin_user) }
it 'allows tags listing and editing' do
visit admin_terms_of_service_index_path
diff --git a/spec/system/admin/trends/links/preview_card_providers_spec.rb b/spec/system/admin/trends/links/preview_card_providers_spec.rb
index 16343a6891..0a5b5a7581 100644
--- a/spec/system/admin/trends/links/preview_card_providers_spec.rb
+++ b/spec/system/admin/trends/links/preview_card_providers_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::Trends::Links::PreviewCardProviders' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before do
sign_in current_user
diff --git a/spec/system/admin/trends/links_spec.rb b/spec/system/admin/trends/links_spec.rb
index 7a51c337c9..15138f42d1 100644
--- a/spec/system/admin/trends/links_spec.rb
+++ b/spec/system/admin/trends/links_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::Trends::Links' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before do
sign_in current_user
diff --git a/spec/system/admin/trends/statuses_spec.rb b/spec/system/admin/trends/statuses_spec.rb
index 13fc966dfd..45c048afb0 100644
--- a/spec/system/admin/trends/statuses_spec.rb
+++ b/spec/system/admin/trends/statuses_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::Trends::Statuses' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before do
sign_in current_user
diff --git a/spec/system/admin/trends/tags_spec.rb b/spec/system/admin/trends/tags_spec.rb
index d914badbd4..30b0850b93 100644
--- a/spec/system/admin/trends/tags_spec.rb
+++ b/spec/system/admin/trends/tags_spec.rb
@@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe 'Admin::Trends::Tags' do
- let(:current_user) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let(:current_user) { Fabricate(:admin_user) }
before do
sign_in current_user
diff --git a/spec/system/admin/webhooks_spec.rb b/spec/system/admin/webhooks_spec.rb
index eb3138c380..cd9eb96da2 100644
--- a/spec/system/admin/webhooks_spec.rb
+++ b/spec/system/admin/webhooks_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe 'Admin Webhooks' do
describe 'Managing webhooks' do
- before { sign_in Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ before { sign_in Fabricate(:admin_user) }
describe 'Viewing webhooks' do
let!(:webhook) { Fabricate :webhook }
diff --git a/spec/system/disputes/appeals_spec.rb b/spec/system/disputes/appeals_spec.rb
index a225635fb2..860b8fcfd1 100644
--- a/spec/system/disputes/appeals_spec.rb
+++ b/spec/system/disputes/appeals_spec.rb
@@ -4,7 +4,7 @@ require 'rails_helper'
RSpec.describe 'Dispute Appeals' do
let(:user) { Fabricate(:user) }
- let!(:admin) { Fabricate(:user, role: UserRole.find_by(name: 'Admin')) }
+ let!(:admin) { Fabricate(:admin_user) }
before { sign_in user }
diff --git a/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb b/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb
index d9355248ba..af3c3fba34 100644
--- a/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb
+++ b/spec/workers/scheduler/auto_close_registrations_scheduler_spec.rb
@@ -9,8 +9,8 @@ RSpec.describe Scheduler::AutoCloseRegistrationsScheduler do
let(:moderator_activity_date) { Time.now.utc }
before do
- Fabricate(:user, role: UserRole.find_by(name: 'Owner'), current_sign_in_at: 10.years.ago)
- Fabricate(:user, role: UserRole.find_by(name: 'Moderator'), current_sign_in_at: moderator_activity_date)
+ Fabricate(:owner_user, current_sign_in_at: 10.years.ago)
+ Fabricate(:moderator_user, current_sign_in_at: moderator_activity_date)
end
context 'when registrations are open' do
diff --git a/yarn.lock b/yarn.lock
index c6f0444188..13adec91f8 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -17506,22 +17506,22 @@ __metadata:
linkType: hard
"typescript@npm:5, typescript@npm:^5.0.4":
- version: 5.6.3
- resolution: "typescript@npm:5.6.3"
+ version: 5.7.2
+ resolution: "typescript@npm:5.7.2"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 10c0/44f61d3fb15c35359bc60399cb8127c30bae554cd555b8e2b46d68fa79d680354b83320ad419ff1b81a0bdf324197b29affe6cc28988cd6a74d4ac60c94f9799
+ checksum: 10c0/a873118b5201b2ef332127ef5c63fb9d9c155e6fdbe211cbd9d8e65877283797cca76546bad742eea36ed7efbe3424a30376818f79c7318512064e8625d61622
languageName: node
linkType: hard
"typescript@patch:typescript@npm%3A5#optional!builtin, typescript@patch:typescript@npm%3A^5.0.4#optional!builtin":
- version: 5.6.3
- resolution: "typescript@patch:typescript@npm%3A5.6.3#optional!builtin::version=5.6.3&hash=8c6c40"
+ version: 5.7.2
+ resolution: "typescript@patch:typescript@npm%3A5.7.2#optional!builtin::version=5.7.2&hash=5786d5"
bin:
tsc: bin/tsc
tsserver: bin/tsserver
- checksum: 10c0/7c9d2e07c81226d60435939618c91ec2ff0b75fbfa106eec3430f0fcf93a584bc6c73176676f532d78c3594fe28a54b36eb40b3d75593071a7ec91301533ace7
+ checksum: 10c0/f3b8082c9d1d1629a215245c9087df56cb784f9fb6f27b5d55577a20e68afe2a889c040aacff6d27e35be165ecf9dca66e694c42eb9a50b3b2c451b36b5675cb
languageName: node
linkType: hard