Merge branch 'main' into glitch-soc/merge-upstream

Conflicts:
- `README.md`:
  Upstream updated its README, while we have a completely different one.
  Kept our README.
- `app/controllers/concerns/web_app_controller_concern.rb`:
  Conflict because of glitch-soc's theming system.
  Additionally, glitch-soc has different behavior regarding moved accounts.
  Ported some of the changes, but kept our overall behavior.
- `app/javascript/packs/admin.js`:
  Code changes actually applied to `app/javascript/core/admin.js`
This commit is contained in:
Claire
2023-01-05 14:16:25 +01:00
47 changed files with 357 additions and 327 deletions

View File

@@ -13,6 +13,8 @@ RSpec.describe SuspendAccountService, type: :service do
local_follower.follow!(account)
list.accounts << account
account.suspend!
end
it "unmerges from local followers' feeds" do
@@ -21,8 +23,8 @@ RSpec.describe SuspendAccountService, type: :service do
expect(FeedManager.instance).to have_received(:unmerge_from_list).with(account, list)
end
it 'marks account as suspended' do
expect { subject }.to change { account.suspended? }.from(false).to(true)
it 'does not change the “suspended” flag' do
expect { subject }.to_not change { account.suspended? }
end
end

View File

@@ -14,7 +14,7 @@ RSpec.describe UnsuspendAccountService, type: :service do
local_follower.follow!(account)
list.accounts << account
account.suspend!(origin: :local)
account.unsuspend!
end
end
@@ -30,8 +30,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
stub_request(:post, 'https://bob.com/inbox').to_return(status: 201)
end
it 'marks account as unsuspended' do
expect { subject }.to change { account.suspended? }.from(true).to(false)
it 'does not change the “suspended” flag' do
expect { subject }.to_not change { account.suspended? }
end
include_examples 'common behavior' do
@@ -83,8 +83,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
expect(FeedManager.instance).to have_received(:merge_into_list).with(account, list)
end
it 'marks account as unsuspended' do
expect { subject }.to change { account.suspended? }.from(true).to(false)
it 'does not change the “suspended” flag' do
expect { subject }.to_not change { account.suspended? }
end
end
@@ -107,8 +107,8 @@ RSpec.describe UnsuspendAccountService, type: :service do
expect(FeedManager.instance).to_not have_received(:merge_into_list).with(account, list)
end
it 'does not mark the account as unsuspended' do
expect { subject }.not_to change { account.suspended? }
it 'marks account as suspended' do
expect { subject }.to change { account.suspended? }.from(false).to(true)
end
end