diff options
Diffstat (limited to 'spec/requests/admin/background_migrations_controller_spec.rb')
-rw-r--r-- | spec/requests/admin/background_migrations_controller_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/requests/admin/background_migrations_controller_spec.rb b/spec/requests/admin/background_migrations_controller_spec.rb index 55971a00e55..9933008502f 100644 --- a/spec/requests/admin/background_migrations_controller_spec.rb +++ b/spec/requests/admin/background_migrations_controller_spec.rb @@ -10,7 +10,7 @@ RSpec.describe Admin::BackgroundMigrationsController, :enable_admin_mode do end describe 'POST #retry' do - let(:migration) { create(:batched_background_migration, status: 'failed') } + let(:migration) { create(:batched_background_migration, :failed) } before do create(:batched_background_migration_job, :failed, batched_migration: migration, batch_size: 10, min_value: 6, max_value: 15, attempts: 3) @@ -37,11 +37,11 @@ RSpec.describe Admin::BackgroundMigrationsController, :enable_admin_mode do it 'retries the migration' do retry_migration - expect(migration.reload.status).to eql 'active' + expect(migration.reload.status_name).to be :active end context 'when the migration is not failed' do - let(:migration) { create(:batched_background_migration, status: 'paused') } + let(:migration) { create(:batched_background_migration, :paused) } it 'keeps the same migration status' do expect { retry_migration }.not_to change { migration.reload.status } |