diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-07-29 13:23:28 +0200 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-07-29 13:23:28 +0200 |
commit | 72c552c2d4ea985a9ab1470ba2e44fc7e52673d9 (patch) | |
tree | 924810d81d0a476885c85734fdb48956d4e6c13a /spec/models | |
parent | 76b3e44c3955e14addc7e577a475634e6f0f68b3 (diff) | |
download | gitlab-ce-72c552c2d4ea985a9ab1470ba2e44fc7e52673d9.tar.gz |
Fix specs
Diffstat (limited to 'spec/models')
-rw-r--r-- | spec/models/project_spec.rb | 18 |
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 |