Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
heptapod
heptapod
Commits
302555e87f65
Commit
302555e8
authored
Jul 29, 2015
by
Douwe Maan
Browse files
Fix specs
parent
1182a336601a
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/models/project.rb
View file @
302555e8
...
...
@@ -571,7 +571,7 @@
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 @
302555e8
...
...
@@ -111,8 +111,11 @@
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
...
...
@@ -117,8 +120,11 @@
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
Supports
Markdown
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