mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-09 09:12:19 +00:00
Combine repeated subject
in cli/accounts
spec shared example (#28942)
This commit is contained in:
parent
1a30a517d6
commit
5fbdb2055b
|
@ -1326,18 +1326,16 @@ describe Mastodon::CLI::Accounts do
|
|||
end
|
||||
|
||||
shared_examples 'a successful migration' do
|
||||
it 'calls the MoveService for the last migration' do
|
||||
expect { subject }
|
||||
.to output_results('OK')
|
||||
|
||||
last_migration = source_account.migrations.last
|
||||
|
||||
expect(move_service).to have_received(:call).with(last_migration).once
|
||||
end
|
||||
|
||||
it 'displays a successful message' do
|
||||
it 'displays a success message and calls the MoveService for the last migration' do
|
||||
expect { subject }
|
||||
.to output_results("OK, migrated #{source_account.acct} to #{target_account.acct}")
|
||||
|
||||
expect(move_service)
|
||||
.to have_received(:call).with(last_migration).once
|
||||
end
|
||||
|
||||
def last_migration
|
||||
source_account.migrations.last
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue