diff options
author | Regis <boudinot.regis@yahoo.com> | 2017-01-04 20:55:25 +0300 |
---|---|---|
committer | Regis <boudinot.regis@yahoo.com> | 2017-01-04 20:55:25 +0300 |
commit | 1655824fa44c428b9570dc96688d27faef186024 (patch) | |
tree | 14bbb2ba241efbabef6def3b3415f9f1b6851d3a /spec/models | |
parent | cf039f58585e5238cd979ba70a5fd2d5c1eee650 (diff) | |
parent | ec4fe4432a2c4daa14c8e8f7c5d8567553062ebf (diff) |
Merge branch 'master' into auto-pipelines-vue
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/group_label_spec.rb | 2 | ||||
-rw-r--r-- | spec/models/issue_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/merge_request_spec.rb | 4 | ||||
-rw-r--r-- | spec/models/project_spec.rb | 8 |
4 files changed, 9 insertions, 9 deletions
diff --git a/spec/models/group_label_spec.rb b/spec/models/group_label_spec.rb index 668aa6fb357..555a876daeb 100644 --- a/spec/models/group_label_spec.rb +++ b/spec/models/group_label_spec.rb @@ -43,7 +43,7 @@ describe GroupLabel, models: true do let(:target_project) { build_stubbed(:empty_project, name: 'project-2', namespace: namespace) } it 'returns a String reference to the object' do - expect(label.to_reference(source_project, target_project)).to eq %(project-1~#{label.id}) + expect(label.to_reference(source_project, target_project: target_project)).to eq %(project-1~#{label.id}) end end diff --git a/spec/models/issue_spec.rb b/spec/models/issue_spec.rb index bb56e44db29..bfa36d92ac3 100644 --- a/spec/models/issue_spec.rb +++ b/spec/models/issue_spec.rb @@ -30,6 +30,10 @@ describe Issue, models: true do expect(issue.to_reference).to eq "#1" end + it 'returns a String reference with the full path' do + expect(issue.to_reference(full: true)).to eq(project.path_with_namespace + '#1') + end + it 'supports a cross-project reference' do another_project = build(:project, name: 'another-project', namespace: project.namespace) expect(issue.to_reference(another_project)).to eq "sample-project#1" diff --git a/spec/models/merge_request_spec.rb b/spec/models/merge_request_spec.rb index 646e6c6dbb3..8d1385016fd 100644 --- a/spec/models/merge_request_spec.rb +++ b/spec/models/merge_request_spec.rb @@ -153,6 +153,10 @@ describe MergeRequest, models: true do another_project = build(:project, name: 'another-project', namespace: project.namespace) expect(merge_request.to_reference(another_project)).to eq "sample-project!1" end + + it 'returns a String reference with the full path' do + expect(merge_request.to_reference(full: true)).to eq(project.path_with_namespace + '!1') + end end describe '#raw_diffs' do diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb index fb225eb7625..3ec7bb46686 100644 --- a/spec/models/project_spec.rb +++ b/spec/models/project_spec.rb @@ -362,14 +362,6 @@ describe Project, models: true do end end - describe "#web_url_without_protocol" do - let(:project) { create(:empty_project, path: "somewhere") } - - it 'returns the web URL without the protocol for this repo' do - expect(project.web_url_without_protocol).to eq("#{Gitlab.config.gitlab.url.split('://')[1]}/#{project.namespace.path}/somewhere") - end - end - describe "#new_issue_address" do let(:project) { create(:empty_project, path: "somewhere") } let(:user) { create(:user) } |