diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2016-12-30 22:49:59 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-01-13 17:16:35 +0300 |
commit | 557a0bf14c79c02c65196ff8f7a2251ecd77073c (patch) | |
tree | 36cef1d85fbc5541ec15949d5ea42feb8444c6df /spec/helpers/merge_requests_helper_spec.rb | |
parent | aa934c7469372cac7b8cd10b49761d90d8e367fa (diff) |
Address MR comments
Diffstat (limited to 'spec/helpers/merge_requests_helper_spec.rb')
-rw-r--r-- | spec/helpers/merge_requests_helper_spec.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/spec/helpers/merge_requests_helper_spec.rb b/spec/helpers/merge_requests_helper_spec.rb index 903224589dd..1f221487393 100644 --- a/spec/helpers/merge_requests_helper_spec.rb +++ b/spec/helpers/merge_requests_helper_spec.rb @@ -62,4 +62,19 @@ describe MergeRequestsHelper do it { is_expected.to eq([source_title, target_title]) } end end + + describe 'mr_widget_refresh_url' do + let(:merge_request) { create(:merge_request, source_project: project) } + let(:project) { create(:project) } + + it 'returns correct url for MR' do + expected_url = "#{project.path_with_namespace}/merge_requests/#{merge_request.iid}/merge_widget_refresh" + + expect(mr_widget_refresh_url(merge_request)).to end_with(expected_url) + end + + it 'returns empty string for nil' do + expect(mr_widget_refresh_url(nil)).to end_with('') + end + end end |