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
86d5a63e
Commit
86d5a63e
authored
Oct 06, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix failing api specs.
parent
ff435000
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
spec/requests/api/namespaces_spec.rb
spec/requests/api/namespaces_spec.rb
+1
-2
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+9
-2
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+4
-1
No files found.
spec/requests/api/namespaces_spec.rb
View file @
86d5a63e
...
@@ -20,8 +20,7 @@ describe API::API, api: true do
...
@@ -20,8 +20,7 @@ describe API::API, api: true do
response
.
status
.
should
==
200
response
.
status
.
should
==
200
json_response
.
should
be_an
Array
json_response
.
should
be_an
Array
# Admin namespace + 2 group namespaces
json_response
.
length
.
should
==
Namespace
.
count
json_response
.
length
.
should
==
3
end
end
end
end
end
end
...
...
spec/requests/api/projects_spec.rb
View file @
86d5a63e
...
@@ -54,8 +54,15 @@ describe API::API, api: true do
...
@@ -54,8 +54,15 @@ describe API::API, api: true do
get
api
(
"/projects/all"
,
admin
)
get
api
(
"/projects/all"
,
admin
)
response
.
status
.
should
==
200
response
.
status
.
should
==
200
json_response
.
should
be_an
Array
json_response
.
should
be_an
Array
json_response
.
first
[
'name'
].
should
==
project
.
name
project_name
=
project
.
name
json_response
.
first
[
'owner'
][
'username'
].
should
==
user
.
username
json_response
.
detect
{
|
project
|
project
[
'name'
]
==
project_name
}[
'name'
].
should
==
project_name
json_response
.
detect
{
|
project
|
project
[
'owner'
][
'username'
]
==
user
.
username
}[
'owner'
][
'username'
].
should
==
user
.
username
end
end
end
end
end
end
...
...
spec/requests/api/users_spec.rb
View file @
86d5a63e
...
@@ -20,7 +20,10 @@ describe API::API, api: true do
...
@@ -20,7 +20,10 @@ describe API::API, api: true do
get
api
(
"/users"
,
user
)
get
api
(
"/users"
,
user
)
response
.
status
.
should
==
200
response
.
status
.
should
==
200
json_response
.
should
be_an
Array
json_response
.
should
be_an
Array
json_response
.
first
[
'username'
].
should
==
user
.
username
username
=
user
.
username
json_response
.
detect
{
|
user
|
user
[
'username'
]
==
username
}[
'username'
].
should
==
username
end
end
end
end
...
...
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