summaryrefslogtreecommitdiff
path: root/spec/models/project_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-07-31 14:20:28 +0200
committerDouwe Maan <douwe@gitlab.com>2015-07-31 14:20:28 +0200
commitf71d67dda172a996b23b541b0e26c2c7edc06072 (patch)
treeb4df56c135b47897507d30ac855bfc10da03781c /spec/models/project_spec.rb
parent66cc712fa516d758ab09f22ffe78b85cb4415740 (diff)
parenta51a3fb8ed92a58b375125b19f75c3d4c545571a (diff)
downloadgitlab-ce-add-license.tar.gz
Merge branch 'master' into add-licenseadd-license
Diffstat (limited to 'spec/models/project_spec.rb')
-rw-r--r--spec/models/project_spec.rb18
1 files changed, 12 insertions, 6 deletions
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 63091e913ff..1ffd92b9bd9 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -111,14 +111,20 @@ describe Project do
expect(project.url_to_repo).to eq(Gitlab.config.gitlab_shell.ssh_path_prefix + 'somewhere.git')
end
- it 'returns the full web URL for this repo' do
- project = Project.new(path: 'somewhere')
- expect(project.web_url).to eq("#{Gitlab.config.gitlab.url}/somewhere")
+ describe "#web_url" do
+ let(:project) { create(:empty_project, path: "somewhere") }
+
+ it 'returns the full web URL for this repo' do
+ expect(project.web_url).to eq("#{Gitlab.config.gitlab.url}/#{project.namespace.path}/somewhere")
+ end
end
- it 'returns the web URL without the protocol for this repo' do
- project = Project.new(path: 'somewhere')
- expect(project.web_url_without_protocol).to eq("#{Gitlab.config.gitlab.url.split('://')[1]}/somewhere")
+ 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 'last_activity methods' do