diff options
author | Jarka Kadlecova <jarka@gitlab.com> | 2017-02-05 13:15:05 +0300 |
---|---|---|
committer | Jarka Kadlecova <jarka@gitlab.com> | 2017-02-07 09:54:59 +0300 |
commit | 831b9335ba438b72ed9b2e3be5a02add9eb87228 (patch) | |
tree | 31a0844315c9d12c06f9c088e016aa1f8b82ed5e /spec | |
parent | 4d11903dcf818342c4bde1af198eac7a45460318 (diff) |
Fix MR widget url
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/merge_requests_helper_spec.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/spec/helpers/merge_requests_helper_spec.rb b/spec/helpers/merge_requests_helper_spec.rb index 550b4a66a6a..8d268dbcf36 100644 --- a/spec/helpers/merge_requests_helper_spec.rb +++ b/spec/helpers/merge_requests_helper_spec.rb @@ -63,9 +63,11 @@ describe MergeRequestsHelper do end end - describe 'mr_widget_refresh_url' do - let(:project) { create(:empty_project) } - let(:merge_request) { create(:merge_request, source_project: project) } + describe '#mr_widget_refresh_url' do + let(:guest) { create(:user) } + let(:project) { create(:project, :public) } + let(:project_fork) { Projects::ForkService.new(project, guest).execute } + let(:merge_request) { create(:merge_request, source_project: project_fork, target_project: project) } it 'returns correct url for MR' do expected_url = "#{project.path_with_namespace}/merge_requests/#{merge_request.iid}/merge_widget_refresh" @@ -74,7 +76,7 @@ describe MergeRequestsHelper do end it 'returns empty string for nil' do - expect(mr_widget_refresh_url(nil)).to end_with('') + expect(mr_widget_refresh_url(nil)).to eq('') end end end |