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
iv
gitlab-ce
Commits
b6f249dc
Commit
b6f249dc
authored
Sep 12, 2012
by
Nihad Abbasov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
make API specs more organized and readable
parent
a87c268f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
12 deletions
+18
-12
spec/requests/api/issues_spec.rb
spec/requests/api/issues_spec.rb
+6
-4
spec/requests/api/projects_spec.rb
spec/requests/api/projects_spec.rb
+6
-4
spec/requests/api/users_spec.rb
spec/requests/api/users_spec.rb
+6
-4
No files found.
spec/requests/api/issues_spec.rb
View file @
b6f249dc
...
...
@@ -9,12 +9,14 @@ describe Gitlab::API do
before
{
project
.
add_access
(
user
,
:read
)
}
describe
"GET /issues"
do
it
"should return authentication error"
do
get
api
(
"/issues"
)
response
.
status
.
should
==
401
context
"when unauthenticated"
do
it
"should return authentication error"
do
get
api
(
"/issues"
)
response
.
status
.
should
==
401
end
end
describe
"authenticated GET /issues
"
do
context
"when authenticated
"
do
it
"should return an array of issues"
do
get
api
(
"/issues"
,
user
)
response
.
status
.
should
==
200
...
...
spec/requests/api/projects_spec.rb
View file @
b6f249dc
...
...
@@ -9,12 +9,14 @@ describe Gitlab::API do
before
{
project
.
add_access
(
user
,
:read
)
}
describe
"GET /projects"
do
it
"should return authentication error"
do
get
api
(
"/projects"
)
response
.
status
.
should
==
401
context
"when unauthenticated"
do
it
"should return authentication error"
do
get
api
(
"/projects"
)
response
.
status
.
should
==
401
end
end
describe
"authenticated GET /projects
"
do
context
"when authenticated
"
do
it
"should return an array of projects"
do
get
api
(
"/projects"
,
user
)
response
.
status
.
should
==
200
...
...
spec/requests/api/users_spec.rb
View file @
b6f249dc
...
...
@@ -6,12 +6,14 @@ describe Gitlab::API do
let
(
:user
)
{
Factory
:user
}
describe
"GET /users"
do
it
"should return authentication error"
do
get
api
(
"/users"
)
response
.
status
.
should
==
401
context
"when unauthenticated"
do
it
"should return authentication error"
do
get
api
(
"/users"
)
response
.
status
.
should
==
401
end
end
describe
"authenticated GET /users
"
do
context
"when authenticated
"
do
it
"should return an array of users"
do
get
api
(
"/users"
,
user
)
response
.
status
.
should
==
200
...
...
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