diff options
author | Stan Hu <stanhu@gmail.com> | 2015-02-24 09:50:40 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-02-24 09:51:24 +0300 |
commit | e363f2e67544e210e92acc06a5af90d91c0aa684 (patch) | |
tree | a3fb6c8576c24a3f6dd79ccb9a9c9f4e69615f67 /spec/lib/gitlab/url_builder_spec.rb | |
parent | 24c8381de281576deeaacf6ba1b46271767594d8 (diff) |
Fix merge request URL passed to Webhooks.
Previously the symbol "url" in the object_attributes hash would always be nil.
Diffstat (limited to 'spec/lib/gitlab/url_builder_spec.rb')
-rw-r--r-- | spec/lib/gitlab/url_builder_spec.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/lib/gitlab/url_builder_spec.rb b/spec/lib/gitlab/url_builder_spec.rb index 716430340b6..518239fab6d 100644 --- a/spec/lib/gitlab/url_builder_spec.rb +++ b/spec/lib/gitlab/url_builder_spec.rb @@ -8,4 +8,12 @@ describe Gitlab::UrlBuilder do expect(url).to eq "#{Settings.gitlab['url']}/#{issue.project.path_with_namespace}/issues/#{issue.iid}" end end + + describe 'When asking for an merge request' do + it 'returns the merge request url' do + merge_request = create(:merge_request) + url = Gitlab::UrlBuilder.new(:merge_request).build(merge_request.id) + expect(url).to eq "#{Settings.gitlab['url']}/#{merge_request.project.to_param}/merge_requests/#{merge_request.id}" + end + end end |