BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
d269d107
Commit
d269d107
authored
Feb 27, 2013
by
Sebastian Ziebell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
API: fixed adding a note
Now the correct attribute is checked if it's available or not. Also fixed a test.
parent
3bb342b9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
3 deletions
+2
-3
notes.rb
lib/api/notes.rb
+1
-1
projects_spec.rb
spec/requests/api/projects_spec.rb
+1
-2
No files found.
lib/api/notes.rb
View file @
d269d107
...
...
@@ -93,7 +93,7 @@ module Gitlab
# POST /projects/:id/issues/:noteable_id/notes
# POST /projects/:id/snippets/:noteable_id/notes
post
":id/
#{
noteables_str
}
/:
#{
noteable_id_str
}
/notes"
do
required_attributes!
[
:
"
#{
noteable_id_str
}
"
]
required_attributes!
[
:
body
]
@noteable
=
user_project
.
send
(
:"
#{
noteables_str
}
"
).
find
(
params
[
:"
#{
noteable_id_str
}
"
])
@note
=
@noteable
.
notes
.
new
(
note:
params
[
:body
])
...
...
spec/requests/api/projects_spec.rb
View file @
d269d107
...
...
@@ -466,8 +466,7 @@ describe Gitlab::API do
response
.
status
.
should
==
200
json_response
.
should
be_an
Array
#json_response.first['id'].should == project.repository.commit.id
json_response
.
size
.
should
==
1
json_response
.
first
[
'id'
].
should
==
project
.
repository
.
commit
.
id
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