Merge commit '82e477b184b5666fff7fb55933dce22ca2925db8' into glitch-soc/merge-upstream

Conflicts:
- `db/migrate/20180831171112_create_bookmarks.rb`:
  Upstream ran a lint fix on this file, but this file is different in
  glitch-soc because the feature was added much earlier.
  Ran the lint fix on our own version of the file.
This commit is contained in:
Claire
2023-07-12 16:03:05 +02:00
458 changed files with 1117 additions and 853 deletions

View File

@@ -4,11 +4,11 @@ require 'rails_helper'
RSpec.describe AccountMigration do
describe 'validations' do
subject { described_class.new(account: source_account, acct: target_acct) }
let(:source_account) { Fabricate(:account) }
let(:target_acct) { target_account.acct }
let(:subject) { described_class.new(account: source_account, acct: target_acct) }
context 'with valid properties' do
let(:target_account) { Fabricate(:account, username: 'target', domain: 'remote.org') }

View File

@@ -20,7 +20,9 @@ RSpec.describe Account do
end
context 'when the account is of a local user' do
let!(:subject) { Fabricate(:user, email: 'foo+bar@domain.org').account }
subject { local_user_account }
let!(:local_user_account) { Fabricate(:user, email: 'foo+bar@domain.org').account }
it 'creates a canonical domain block' do
subject.suspend!

View File

@@ -7,7 +7,7 @@ describe RelationshipFilter do
describe '#results' do
context 'when default params are used' do
let(:subject) do
subject do
described_class.new(account, 'order' => 'active').results
end

View File

@@ -93,7 +93,7 @@ RSpec.describe UserRole do
describe '#computed_permissions' do
context 'when the role is nobody' do
let(:subject) { described_class.nobody }
subject { described_class.nobody }
it 'returns none' do
expect(subject.computed_permissions).to eq UserRole::Flags::NONE
@@ -101,7 +101,7 @@ RSpec.describe UserRole do
end
context 'when the role is everyone' do
let(:subject) { described_class.everyone }
subject { described_class.everyone }
it 'returns permissions' do
expect(subject.computed_permissions).to eq subject.permissions