| | 264 | If you're not using SOAP (or you're having serialisation difficulties), |
|---|
| | 265 | you can test XMLRPC like this: |
|---|
| | 266 | |
|---|
| | 267 | class PersonApiControllerTest < Test::Unit::TestCase |
|---|
| | 268 | def setup |
|---|
| | 269 | @controller = PersonController.new |
|---|
| | 270 | @request = ActionController::TestRequest.new |
|---|
| | 271 | @response = ActionController::TestResponse.new |
|---|
| | 272 | |
|---|
| | 273 | @protocol = :xmlrpc # can also be :soap, the default |
|---|
| | 274 | end |
|---|
| | 275 | |
|---|
| | 276 | def test_add |
|---|
| | 277 | result = invoke :remove, 1 # no change here |
|---|
| | 278 | assert_equal true, result |
|---|
| | 279 | end |
|---|
| | 280 | end |
|---|