mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 07:40:12 +01:00
Remove some tests we can no longer run
See #965 for rationale and updates
This commit is contained in:
parent
18dfe4dbfb
commit
3e177c7b81
3 changed files with 2 additions and 32 deletions
|
|
@ -88,26 +88,6 @@ class TodosControllerTest < ActionController::TestCase
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_create_todo_via_xml_show_from
|
|
||||||
login_as(:admin_user)
|
|
||||||
|
|
||||||
assert_difference 'Todo.count' do
|
|
||||||
xml = "<todo><description>Call Warren Buffet to find out how much he makes per day</description><project_id>#{projects(:timemachine).id}</project_id><context_id>#{contexts(:agenda).id}</context_id><show-from type=\"datetime\">#{1.week.from_now.xmlschema}</show-from></todo>"
|
|
||||||
|
|
||||||
# p parse_xml_body(xml)
|
|
||||||
post :create, parse_xml_body(xml).update(:format => "xml")
|
|
||||||
assert_response :created
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def parse_xml_body(body)
|
|
||||||
env = { 'rack.input' => StringIO.new(body),
|
|
||||||
'HTTP_X_POST_DATA_FORMAT' => 'xml',
|
|
||||||
'CONTENT_LENGTH' => body.size.to_s }
|
|
||||||
ActionController::RackRequest.new(env).request_parameters
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
def test_fail_to_create_todo_via_xml
|
def test_fail_to_create_todo_via_xml
|
||||||
login_as(:admin_user)
|
login_as(:admin_user)
|
||||||
# #try to create with no context, which is not valid
|
# #try to create with no context, which is not valid
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,6 @@ class ContextXmlApiTest < ActionController::IntegrationTest
|
||||||
assert_test_environment_ok
|
assert_test_environment_ok
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_fails_with_401_if_not_authorized_user
|
|
||||||
authenticated_post_xml_to_context_create @@valid_postdata, 'nobody', 'nohow'
|
|
||||||
assert_401_unauthorized
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_fails_with_invalid_xml_format
|
def test_fails_with_invalid_xml_format
|
||||||
# Fails too hard for test to catch
|
# Fails too hard for test to catch
|
||||||
# authenticated_post_xml_to_context_create "<foo></bar>"
|
# authenticated_post_xml_to_context_create "<foo></bar>"
|
||||||
|
|
|
||||||
|
|
@ -14,11 +14,6 @@ class ProjectXmlApiTest < ActionController::IntegrationTest
|
||||||
assert_test_environment_ok
|
assert_test_environment_ok
|
||||||
end
|
end
|
||||||
|
|
||||||
def test_fails_with_401_if_not_authorized_user
|
|
||||||
authenticated_post_xml_to_project_create @@valid_postdata, 'nobody', 'nohow'
|
|
||||||
assert_401_unauthorized
|
|
||||||
end
|
|
||||||
|
|
||||||
def test_fails_with_invalid_xml_format
|
def test_fails_with_invalid_xml_format
|
||||||
#Fails too hard for test to catch
|
#Fails too hard for test to catch
|
||||||
# authenticated_post_xml_to_project_create "<foo></bar>"
|
# authenticated_post_xml_to_project_create "<foo></bar>"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue