Fix test-related issues (#17888)
* Remove obsolete RSS::Serializer test Since #17828, RSS::Serializer no longer has specific code for deleted statuses, but it is never called on deleted statuses anyway. * Rename erroneously-named test files * Fix failing test * Fix test deprecation warnings * Update CircleCI Ruby orb 1.4.0 has a bug that does not match all the test files due to incorrect globbing
This commit is contained in:
parent
56edc6552f
commit
30658924a8
11 changed files with 70 additions and 90 deletions
|
@ -194,9 +194,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
|
|||
end
|
||||
|
||||
describe 'POST #unblock_email' do
|
||||
subject do
|
||||
-> { post :unblock_email, params: { id: account.id } }
|
||||
end
|
||||
subject { post :unblock_email, params: { id: account.id } }
|
||||
|
||||
let(:current_user) { Fabricate(:user, admin: admin) }
|
||||
let(:account) { Fabricate(:account, suspended: true) }
|
||||
|
@ -206,11 +204,11 @@ RSpec.describe Admin::AccountsController, type: :controller do
|
|||
let(:admin) { true }
|
||||
|
||||
it 'succeeds in removing email blocks' do
|
||||
is_expected.to change { CanonicalEmailBlock.where(reference_account: account).count }.from(1).to(0)
|
||||
expect { subject }.to change { CanonicalEmailBlock.where(reference_account: account).count }.from(1).to(0)
|
||||
end
|
||||
|
||||
it 'redirects to admin account path' do
|
||||
subject.call
|
||||
subject
|
||||
expect(response).to redirect_to admin_account_path(account.id)
|
||||
end
|
||||
end
|
||||
|
@ -219,7 +217,7 @@ RSpec.describe Admin::AccountsController, type: :controller do
|
|||
let(:admin) { false }
|
||||
|
||||
it 'fails to remove avatar' do
|
||||
subject.call
|
||||
subject
|
||||
expect(response).to have_http_status :forbidden
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue