diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-20 12:09:48 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-20 12:09:48 +0300 |
commit | 03409cccee9b1cd8104484077338790add355c7d (patch) | |
tree | 82b4fbbb96d82f235dd1f76f155cd01a1a52d22a /spec/services/issuable | |
parent | 93f77228e32908b64ce7b9a3eb69e48efff11a9c (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/services/issuable')
-rw-r--r-- | spec/services/issuable/destroy_service_spec.rb | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/spec/services/issuable/destroy_service_spec.rb b/spec/services/issuable/destroy_service_spec.rb index fadab77a043..fa4902e5237 100644 --- a/spec/services/issuable/destroy_service_spec.rb +++ b/spec/services/issuable/destroy_service_spec.rb @@ -4,37 +4,12 @@ require 'spec_helper' RSpec.describe Issuable::DestroyService do let(:user) { create(:user) } - let(:project) { create(:project, :public) } + let(:group) { create(:group, :public) } + let(:project) { create(:project, :public, group: group) } subject(:service) { described_class.new(project, user) } describe '#execute' do - shared_examples_for 'service deleting todos' do - it 'destroys associated todos asynchronously' do - expect(TodosDestroyer::DestroyedIssuableWorker) - .to receive(:perform_async) - .with(issuable.id, issuable.class.name) - - subject.execute(issuable) - end - - context 'when destroy_issuable_todos_async feature is disabled' do - before do - stub_feature_flags(destroy_issuable_todos_async: false) - end - - it 'destroy associated todos synchronously' do - expect_next_instance_of(TodosDestroyer::DestroyedIssuableWorker) do |worker| - expect(worker) - .to receive(:perform) - .with(issuable.id, issuable.class.name) - end - - subject.execute(issuable) - end - end - end - context 'when issuable is an issue' do let!(:issue) { create(:issue, project: project, author: user, assignees: [user]) } |