diff options
author | Matt Jankowski <matt@jankowski.online> | 2024-01-26 11:35:19 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-26 16:35:19 +0000 |
commit | 5fbdb2055becdb4177ad8aa0b3891cb2617d223b (patch) | |
tree | 79cd001c9b22c7ee634e6be1ea1f3f6cee7ee137 | |
parent | 1a30a517d60148c518cb74d6c8fbbef21f6fae56 (diff) |
Combine repeated `subject` in `cli/accounts` spec shared example (#28942)
-rw-r--r-- | spec/lib/mastodon/cli/accounts_spec.rb | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/spec/lib/mastodon/cli/accounts_spec.rb b/spec/lib/mastodon/cli/accounts_spec.rb index 98be2b2027d..137f85c6ca2 100644 --- a/spec/lib/mastodon/cli/accounts_spec.rb +++ b/spec/lib/mastodon/cli/accounts_spec.rb @@ -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 + it 'displays a success message and calls the MoveService for the last migration' do expect { subject } - .to output_results('OK') - - last_migration = source_account.migrations.last + .to output_results("OK, migrated #{source_account.acct} to #{target_account.acct}") - expect(move_service).to have_received(:call).with(last_migration).once + expect(move_service) + .to have_received(:call).with(last_migration).once end - it 'displays a successful message' do - expect { subject } - .to output_results("OK, migrated #{source_account.acct} to #{target_account.acct}") + def last_migration + source_account.migrations.last end end |