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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
1d829ca1
Commit
1d829ca1
authored
Mar 24, 2015
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests.
parent
5f93b0e3
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
12 deletions
+12
-12
features/steps/project/source/browse_files.rb
features/steps/project/source/browse_files.rb
+1
-1
spec/lib/gitlab/regex_spec.rb
spec/lib/gitlab/regex_spec.rb
+8
-8
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+1
-1
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+2
-2
No files found.
features/steps/project/source/browse_files.rb
View file @
1d829ca1
...
@@ -74,7 +74,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
...
@@ -74,7 +74,7 @@ class Spinach::Features::ProjectSourceBrowseFiles < Spinach::FeatureSteps
end
end
step
'I fill the new file name with an illegal name'
do
step
'I fill the new file name with an illegal name'
do
fill_in
:file_name
,
with:
'
.git
'
fill_in
:file_name
,
with:
'
Spaces Not Allowed
'
end
end
step
'I fill the commit message'
do
step
'I fill the commit message'
do
...
...
spec/lib/gitlab/regex_spec.rb
View file @
1d829ca1
require
'spec_helper'
require
'spec_helper'
describe
Gitlab
::
Regex
do
describe
Gitlab
::
Regex
do
describe
'path regex'
do
describe
'p
roject p
ath regex'
do
it
{
expect
(
'gitlab-ce'
).
to
match
(
Gitlab
::
Regex
.
path_regex
)
}
it
{
expect
(
'gitlab-ce'
).
to
match
(
Gitlab
::
Regex
.
p
roject_p
ath_regex
)
}
it
{
expect
(
'gitlab_git'
).
to
match
(
Gitlab
::
Regex
.
path_regex
)
}
it
{
expect
(
'gitlab_git'
).
to
match
(
Gitlab
::
Regex
.
p
roject_p
ath_regex
)
}
it
{
expect
(
'_underscore.js'
).
to
match
(
Gitlab
::
Regex
.
path_regex
)
}
it
{
expect
(
'_underscore.js'
).
to
match
(
Gitlab
::
Regex
.
p
roject_p
ath_regex
)
}
it
{
expect
(
'100px.com'
).
to
match
(
Gitlab
::
Regex
.
path_regex
)
}
it
{
expect
(
'100px.com'
).
to
match
(
Gitlab
::
Regex
.
p
roject_p
ath_regex
)
}
it
{
expect
(
'?gitlab'
).
not_to
match
(
Gitlab
::
Regex
.
path_regex
)
}
it
{
expect
(
'?gitlab'
).
not_to
match
(
Gitlab
::
Regex
.
p
roject_p
ath_regex
)
}
it
{
expect
(
'git lab'
).
not_to
match
(
Gitlab
::
Regex
.
path_regex
)
}
it
{
expect
(
'git lab'
).
not_to
match
(
Gitlab
::
Regex
.
p
roject_p
ath_regex
)
}
it
{
expect
(
'gitlab.git'
).
not_to
match
(
Gitlab
::
Regex
.
path_regex
)
}
it
{
expect
(
'gitlab.git'
).
not_to
match
(
Gitlab
::
Regex
.
p
roject_p
ath_regex
)
}
end
end
describe
'project name regex'
do
describe
'project name regex'
do
...
...
spec/requests/api/projects_spec.rb
View file @
1d829ca1
...
@@ -252,7 +252,7 @@ describe API::API, api: true do
...
@@ -252,7 +252,7 @@ describe API::API, api: true do
expect
(
json_response
[
'message'
][
'path'
]).
to
eq
([
expect
(
json_response
[
'message'
][
'path'
]).
to
eq
([
'can\'t be blank'
,
'can\'t be blank'
,
'is too short (minimum is 0 characters)'
,
'is too short (minimum is 0 characters)'
,
Gitlab
::
Regex
.
send
(
:
default
_regex_message
)
Gitlab
::
Regex
.
send
(
:
project_path
_regex_message
)
])
])
end
end
...
...
spec/requests/api/users_spec.rb
View file @
1d829ca1
...
@@ -140,7 +140,7 @@ describe API::API, api: true do
...
@@ -140,7 +140,7 @@ describe API::API, api: true do
expect
(
json_response
[
'message'
][
'projects_limit'
]).
expect
(
json_response
[
'message'
][
'projects_limit'
]).
to
eq
([
'must be greater than or equal to 0'
])
to
eq
([
'must be greater than or equal to 0'
])
expect
(
json_response
[
'message'
][
'username'
]).
expect
(
json_response
[
'message'
][
'username'
]).
to
eq
([
Gitlab
::
Regex
.
send
(
:
default
_regex_message
)])
to
eq
([
Gitlab
::
Regex
.
send
(
:
namespace
_regex_message
)])
end
end
it
"shouldn't available for non admin users"
do
it
"shouldn't available for non admin users"
do
...
@@ -266,7 +266,7 @@ describe API::API, api: true do
...
@@ -266,7 +266,7 @@ describe API::API, api: true do
expect
(
json_response
[
'message'
][
'projects_limit'
]).
expect
(
json_response
[
'message'
][
'projects_limit'
]).
to
eq
([
'must be greater than or equal to 0'
])
to
eq
([
'must be greater than or equal to 0'
])
expect
(
json_response
[
'message'
][
'username'
]).
expect
(
json_response
[
'message'
][
'username'
]).
to
eq
([
Gitlab
::
Regex
.
send
(
:
default
_regex_message
)])
to
eq
([
Gitlab
::
Regex
.
send
(
:
namespace
_regex_message
)])
end
end
context
"with existing user"
do
context
"with existing user"
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