diff options
author | Alex Sanford <alex.sanford1@gmail.com> | 2017-03-17 15:35:39 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-17 15:35:39 +0300 |
commit | 68e3fa0e58938152357c6fb5997f1229666b1d5c (patch) | |
tree | 98c68f6cfbfcf925fae1bc3107f610a463bea0da /spec/services/merge_requests | |
parent | d68c23a00e752d347c2439541fe4dddd602ddbcc (diff) |
Add ability to disable Merge Request URL on push
Diffstat (limited to 'spec/services/merge_requests')
-rw-r--r-- | spec/services/merge_requests/get_urls_service_spec.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/services/merge_requests/get_urls_service_spec.rb b/spec/services/merge_requests/get_urls_service_spec.rb index 08829e4be70..b7a05907208 100644 --- a/spec/services/merge_requests/get_urls_service_spec.rb +++ b/spec/services/merge_requests/get_urls_service_spec.rb @@ -130,5 +130,15 @@ describe MergeRequests::GetUrlsService do }]) end end + + context 'when printing_merge_request_link_enabled is false' do + it 'returns empty array' do + project.update!(printing_merge_request_link_enabled: false) + + result = service.execute(existing_branch_changes) + + expect(result).to eq([]) + end + end end end |