diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 06:08:31 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-20 06:08:31 +0300 |
commit | b0a27063a3efbd9babaa573f9995f902e5b1063c (patch) | |
tree | 09c178332cdf313b8e3addd1b7c57374c53c6f1c /spec/tasks/dev_rake_spec.rb | |
parent | afbf001676ce96bc55d891ec45bf4e68f204a853 (diff) |
Add latest changes from gitlab-org/gitlab@master
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 |