Revision 505945a9
Added by Tomer Brisker about 4 years ago
test/controllers/api/v2/organizations_controller_test.rb | ||
---|---|---|
end
|
||
|
||
test "should not create with content type text plain" do
|
||
assert_raises_with_message(RuntimeError, 'Unknown Content-Type') do
|
||
post :create, params: { :organization => {:name => "foo organization"} }, as: 'text/plain'
|
||
end
|
||
post :create, params: { :organization => {:name => "foo organization"} }, as: Mime::LOOKUP['text/plain']
|
||
assert_response :unsupported_media_type
|
||
end
|
||
|
||
test "create with name" do
|
Also available in: Unified diff
Fixes #29473 - Correctly test invalid content type error