diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-17 11:34:40 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2009-09-17 11:34:40 -0700 |
commit | b5dd1b659987bb6117c0f1657e66dc395cfbed5e (patch) | |
tree | c6b1965c4041dd369d671413875bcf7e6645df93 /activeresource/test/cases/base_errors_test.rb | |
parent | c9d3c48dc6389feb2001372cd76e96274e773c9b (diff) | |
download | rails-b5dd1b659987bb6117c0f1657e66dc395cfbed5e.tar.gz rails-b5dd1b659987bb6117c0f1657e66dc395cfbed5e.tar.bz2 rails-b5dd1b659987bb6117c0f1657e66dc395cfbed5e.zip |
Fix brittle content-type check. [#1956 state:committed]
Diffstat (limited to 'activeresource/test/cases/base_errors_test.rb')
-rw-r--r-- | activeresource/test/cases/base_errors_test.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/test/cases/base_errors_test.rb b/activeresource/test/cases/base_errors_test.rb index eca00e9ca8..1eb7765132 100644 --- a/activeresource/test/cases/base_errors_test.rb +++ b/activeresource/test/cases/base_errors_test.rb @@ -4,8 +4,8 @@ require "fixtures/person" class BaseErrorsTest < Test::Unit::TestCase def setup ActiveResource::HttpMock.respond_to do |mock| - mock.post "/people.xml", {}, %q(<?xml version="1.0" encoding="UTF-8"?><errors><error>Age can't be blank</error><error>Name can't be blank</error><error>Name must start with a letter</error><error>Person quota full for today.</error></errors>), 422, {'Content-Type' => 'application/xml'} - mock.post "/people.json", {}, %q({"errors":["Age can't be blank","Name can't be blank","Name must start with a letter","Person quota full for today."]}), 422, {'Content-Type' => 'application/json'} + mock.post "/people.xml", {}, %q(<?xml version="1.0" encoding="UTF-8"?><errors><error>Age can't be blank</error><error>Name can't be blank</error><error>Name must start with a letter</error><error>Person quota full for today.</error></errors>), 422, {'Content-Type' => 'application/xml; charset=utf-8'} + mock.post "/people.json", {}, %q({"errors":["Age can't be blank","Name can't be blank","Name must start with a letter","Person quota full for today."]}), 422, {'Content-Type' => 'application/json; charset=utf-8'} end end |