diff options
author | Felipe Artur <felipefac@gmail.com> | 2017-03-02 20:57:46 +0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2017-03-02 20:57:46 +0300 |
commit | 2968e87aa7062db2c23265b2d22ac83b889a76d7 (patch) | |
tree | ac61b73f93accd2fa13c1509073537a816a876ba /spec | |
parent | d95ac1b67f155b507da88685496e36cd64fdb435 (diff) |
Revert "Disallow system notes for closed issuables"
This reverts commit 0771774480ce1f46b27b629d3721917d6c1f1267.
Diffstat (limited to 'spec')
-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 |