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
Léo-Paul Géneau
gitlab-ce
Commits
9da7b2e8
Commit
9da7b2e8
authored
Jan 31, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add specs for api -> merge request notes
parent
a037c9c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
0 deletions
+11
-0
spec/requests/api/notes_spec.rb
spec/requests/api/notes_spec.rb
+11
-0
No files found.
spec/requests/api/notes_spec.rb
View file @
9da7b2e8
...
...
@@ -6,8 +6,10 @@ describe Gitlab::API do
let
(
:user
)
{
create
(
:user
)
}
let!
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let!
(
:issue
)
{
create
(
:issue
,
project:
project
,
author:
user
)
}
let!
(
:merge_request
)
{
create
(
:merge_request
,
project:
project
,
author:
user
)
}
let!
(
:snippet
)
{
create
(
:snippet
,
project:
project
,
author:
user
)
}
let!
(
:issue_note
)
{
create
(
:note
,
noteable:
issue
,
project:
project
,
author:
user
)
}
let!
(
:merge_request_note
)
{
create
(
:note
,
noteable:
merge_request
,
project:
project
,
author:
user
)
}
let!
(
:snippet_note
)
{
create
(
:note
,
noteable:
snippet
,
project:
project
,
author:
user
)
}
let!
(
:wall_note
)
{
create
(
:note
,
project:
project
,
author:
user
)
}
before
{
project
.
team
<<
[
user
,
:reporter
]
}
...
...
@@ -64,6 +66,15 @@ describe Gitlab::API do
json_response
.
first
[
'body'
].
should
==
snippet_note
.
note
end
end
context
"when noteable is a Merge Request"
do
it
"should return an array of merge_requests notes"
do
get
api
(
"/projects/
#{
project
.
id
}
/merge_requests/
#{
merge_request
.
id
}
/notes"
,
user
)
response
.
status
.
should
==
200
json_response
.
should
be_an
Array
json_response
.
first
[
'body'
].
should
==
merge_request_note
.
note
end
end
end
describe
"GET /projects/:id/noteable/:noteable_id/notes/:note_id"
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