diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /spec/models/work_item/type_spec.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'spec/models/work_item/type_spec.rb')
-rw-r--r-- | spec/models/work_item/type_spec.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/spec/models/work_item/type_spec.rb b/spec/models/work_item/type_spec.rb index 90f551b7d63..dd5324d63a0 100644 --- a/spec/models/work_item/type_spec.rb +++ b/spec/models/work_item/type_spec.rb @@ -19,8 +19,10 @@ RSpec.describe WorkItem::Type do it 'deletes type but not unrelated issues' do type = create(:work_item_type) + expect(WorkItem::Type.count).to eq(5) + expect { type.destroy! }.not_to change(Issue, :count) - expect(WorkItem::Type.count).to eq 0 + expect(WorkItem::Type.count).to eq(4) end end @@ -28,7 +30,7 @@ RSpec.describe WorkItem::Type do type = create(:work_item_type, work_items: [work_item]) expect { type.destroy! }.to raise_error(ActiveRecord::InvalidForeignKey) - expect(Issue.count).to eq 1 + expect(Issue.count).to eq(1) end end |