Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
72c552c2
Commit
72c552c2
authored
Jul 29, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
76b3e44c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
7 deletions
+13
-7
app/models/project.rb
app/models/project.rb
+1
-1
spec/models/project_spec.rb
spec/models/project_spec.rb
+12
-6
No files found.
app/models/project.rb
View file @
72c552c2
...
...
@@ -571,7 +571,7 @@ class Project < ActiveRecord::Base
end
def
http_url_to_repo
[
gitlab_config
.
url
,
'/'
,
path_with_namespace
,
'.git'
].
join
(
''
)
"
#{
web_url
}
.git"
end
# Check if current branch name is marked as protected in the system
...
...
spec/models/project_spec.rb
View file @
72c552c2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment