diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-05-19 10:33:21 +0300 |
commit | 36a59d088eca61b834191dacea009677a96c052f (patch) | |
tree | e4f33972dab5d8ef79e3944a9f403035fceea43f /spec/tasks/dev_rake_spec.rb | |
parent | a1761f15ec2cae7c7f7bbda39a75494add0dfd6f (diff) |
Add latest changes from gitlab-org/gitlab@15-0-stable-eev15.0.0-rc42
Diffstat (limited to 'spec/tasks/dev_rake_spec.rb')
-rw-r--r-- | spec/tasks/dev_rake_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/tasks/dev_rake_spec.rb b/spec/tasks/dev_rake_spec.rb index 73b1604aa10..fa093db414f 100644 --- a/spec/tasks/dev_rake_spec.rb +++ b/spec/tasks/dev_rake_spec.rb @@ -116,7 +116,7 @@ RSpec.describe 'dev rake tasks' do allow(configurations).to receive(:configs_for).with(env_name: Rails.env, name: 'ci').and_return(ci_configuration) end - subject(:load_task) { run_rake_task('dev:setup_ci_db') } + subject(:load_task) { run_rake_task('dev:copy_db:ci') } let(:ci_configuration) { instance_double(ActiveRecord::DatabaseConfigurations::HashConfig, name: 'ci', database: '__test_db_ci') } @@ -128,14 +128,14 @@ RSpec.describe 'dev rake tasks' do expect(Rake::Task['dev:terminate_all_connections']).to receive(:invoke) - run_rake_task('dev:copy_db:ci') + load_task end context 'when the database already exists' do it 'prints out a warning' do expect(ApplicationRecord.connection).to receive(:create_database).and_raise(ActiveRecord::DatabaseAlreadyExists) - expect { run_rake_task('dev:copy_db:ci') }.to output(/Database '#{ci_configuration.database}' already exists/).to_stderr + expect { load_task }.to output(/Database '#{ci_configuration.database}' already exists/).to_stderr end end end |