test/system/rack_tests.rb in deas-0.13.1 vs test/system/rack_tests.rb in deas-0.14.0

- old
+ new

@@ -23,9 +23,29 @@ "Stuff: Show Info\n" assert_equal 200, last_response.status assert_equal expected_body, last_response.body end + should "set the content type appropriately" do + get '/show' + assert_equal 'text/html;charset=utf-8', last_response.headers['Content-Type'] + + get '/show.html' + assert_equal 'text/html;charset=utf-8', last_response.headers['Content-Type'] + + get '/show.json' + assert_equal 'application/json;charset=utf-8', last_response.headers['Content-Type'] + + get '/show-latin1-json' + assert_equal 'application/json;charset=latin1', last_response.headers['Content-Type'] + + get '/show-text' + assert_equal 'text/plain', last_response.headers['Content-Type'] + + get '/show-headers-text' + assert_equal 'text/plain', last_response.headers['Content-Type'] + end + should "allow halting with a custom response" do get '/halt', 'with' => 234 assert_equal 234, last_response.status end