Speed-up in Settings::
controllers specs (#27808)
This commit is contained in:
parent
ac62b995ef
commit
9dc3ce878b
14 changed files with 65 additions and 216 deletions
|
@ -71,24 +71,22 @@ describe Settings::MigrationsController do
|
|||
context 'when acct is the current account' do
|
||||
let(:acct) { user.account }
|
||||
|
||||
it 'renders show' do
|
||||
expect(subject).to render_template :show
|
||||
end
|
||||
it 'does not update the moved account', :aggregate_failures do
|
||||
subject
|
||||
|
||||
it 'does not update the moved account' do
|
||||
expect(user.account.reload.moved_to_account_id).to be_nil
|
||||
expect(response).to render_template :show
|
||||
end
|
||||
end
|
||||
|
||||
context 'when target account does not reference the account being moved from' do
|
||||
let(:acct) { Fabricate(:account, also_known_as: []) }
|
||||
|
||||
it 'renders show' do
|
||||
expect(subject).to render_template :show
|
||||
end
|
||||
it 'does not update the moved account', :aggregate_failures do
|
||||
subject
|
||||
|
||||
it 'does not update the moved account' do
|
||||
expect(user.account.reload.moved_to_account_id).to be_nil
|
||||
expect(response).to render_template :show
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -100,12 +98,11 @@ describe Settings::MigrationsController do
|
|||
user.account.migrations.create!(acct: moved_to.acct)
|
||||
end
|
||||
|
||||
it 'renders show' do
|
||||
expect(subject).to render_template :show
|
||||
end
|
||||
it 'does not update the moved account', :aggregate_failures do
|
||||
subject
|
||||
|
||||
it 'does not update the moved account' do
|
||||
expect(user.account.reload.moved_to_account_id).to be_nil
|
||||
expect(response).to render_template :show
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue