diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/support/shared_examples/work_item_base_types_importer.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/support/shared_examples/work_item_base_types_importer.rb')
-rw-r--r-- | spec/support/shared_examples/work_item_base_types_importer.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/shared_examples/work_item_base_types_importer.rb b/spec/support/shared_examples/work_item_base_types_importer.rb index 593670ac4b8..b1011037584 100644 --- a/spec/support/shared_examples/work_item_base_types_importer.rb +++ b/spec/support/shared_examples/work_item_base_types_importer.rb @@ -4,7 +4,7 @@ RSpec.shared_examples 'work item base types importer' do it "creates all base work item types if they don't exist" do WorkItems::Type.delete_all - expect { subject }.to change(WorkItems::Type, :count).from(0).to(WorkItems::Type::BASE_TYPES.count) + expect { subject }.to change { WorkItems::Type.count }.from(0).to(WorkItems::Type::BASE_TYPES.count) types_in_db = WorkItems::Type.all.map { |type| type.slice(:base_type, :icon_name, :name).symbolize_keys } expected_types = WorkItems::Type::BASE_TYPES.map do |type, attributes| @@ -25,7 +25,7 @@ RSpec.shared_examples 'work item base types importer' do subject first_type.reload end.to not_change(WorkItems::Type, :count).and( - change(first_type, :name).from(original_name.upcase).to(original_name) + change { first_type.name }.from(original_name.upcase).to(original_name) ) end @@ -40,7 +40,7 @@ RSpec.shared_examples 'work item base types importer' do it 'inserts all types and does nothing if some already existed' do expect { subject }.to make_queries_matching(/INSERT/, 1).and( - change(WorkItems::Type, :count).by(1) + change { WorkItems::Type.count }.by(1) ) expect(WorkItems::Type.count).to eq(WorkItems::Type::BASE_TYPES.count) end |