diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-03 17:39:20 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-03 17:39:20 +0300 |
commit | 433ec4d8da9d6c3b45660892a15e88a1719e7599 (patch) | |
tree | 2bd0270b1aec8309af2f4481cc11b2f81d41ceae /spec/services | |
parent | 86d1e42ab34d15a801b97d4d1b7812fb4259f7e5 (diff) | |
parent | 2968e87aa7062db2c23265b2d22ac83b889a76d7 (diff) |
Merge branch 'revert_disallow_system_notes_for_closed_issuables' into 'master'
Revert "Disallow system notes for closed issuables"
Closes #28207
See merge request !9673
Diffstat (limited to 'spec/services')
-rw-r--r-- | spec/services/system_note_service_spec.rb | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index 1f2ec9eacf0..36a17a3bf2e 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -418,45 +418,6 @@ describe SystemNoteService, services: true do to be_truthy end end - - context 'when noteable is an Issue' do - let(:issue) { create(:issue, project: project) } - - it 'is truthy when issue is closed' do - issue.close - - expect(described_class.cross_reference_disallowed?(issue, project.commit)). - to be_truthy - end - - it 'is falsey when issue is open' do - expect(described_class.cross_reference_disallowed?(issue, project.commit)). - to be_falsy - end - end - - context 'when noteable is a Merge Request' do - let(:merge_request) { create(:merge_request, :simple, source_project: project) } - - it 'is truthy when merge request is closed' do - allow(merge_request).to receive(:closed?).and_return(:true) - - expect(described_class.cross_reference_disallowed?(merge_request, project.commit)). - to be_truthy - end - - it 'is truthy when merge request is merged' do - allow(merge_request).to receive(:closed?).and_return(:true) - - expect(described_class.cross_reference_disallowed?(merge_request, project.commit)). - to be_truthy - end - - it 'is falsey when merge request is open' do - expect(described_class.cross_reference_disallowed?(merge_request, project.commit)). - to be_falsy - end - end end describe '.cross_reference_exists?' do |