diff options
Diffstat (limited to 'spec/tasks/gitlab/db_rake_spec.rb')
-rw-r--r-- | spec/tasks/gitlab/db_rake_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb index 08bec9fda78..22abfc33d1b 100644 --- a/spec/tasks/gitlab/db_rake_spec.rb +++ b/spec/tasks/gitlab/db_rake_spec.rb @@ -701,6 +701,16 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout do describe '#up' do subject { run_rake_task("gitlab:db:migration_testing:up:#{db}") } + let(:migrations_id_runner) do + instance_double('Gitlab::Database::Migrations::BatchedMigrationLastId', store: true) + end + + before do + allow(::Gitlab::Database::Migrations::Runner).to( + receive(:batched_migrations_last_id).and_return(migrations_id_runner) + ) + end + it 'delegates to the migration runner' do expect(::Gitlab::Database::Migrations::Runner).to receive(:up).with(database: db).and_return(runner) expect(runner).to receive(:run) |