mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
fix regression by last commit
Signed-off-by: Reinier Balt <lrbalt@gmail.com>
This commit is contained in:
parent
f5cabbf74d
commit
8fe5552d64
2 changed files with 8 additions and 8 deletions
|
|
@ -37,17 +37,15 @@ class TodoXmlApiTest < ActionController::IntegrationTest
|
|||
def test_post_create_todo_with_wrong_project_and_context_id
|
||||
authenticated_post_xml_to_todo_create "<todo><description>this will fail</description><context_id type='integer'>-16</context_id><project_id type='integer'>-11</project_id></todo>"
|
||||
assert_response 422
|
||||
assert_xml_select 'errors' do
|
||||
assert_select 'error', 2
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def authenticated_post_xml_to_todo_create(postdata = @@valid_postdata, user = users(:other_user).login, password = 'sesame')
|
||||
authenticated_post_xml "/todos", user, password, postdata
|
||||
assert_xml_select 'errors' do
|
||||
assert_select 'error', 2, 'Project unknown'
|
||||
assert_select 'error', 2, 'Context unknown'
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue