test/pinglish_test.rb in pinglish-0.1.0 vs test/pinglish_test.rb in pinglish-0.2.0

- old
+ new

@@ -136,9 +136,23 @@ assert json.key?("now") assert_equal "failures", json["status"] assert_equal ["long"], json["timeouts"] end + def test_with_script_name + app = build_app + + session = Rack::Test::Session.new(app) + session.get "/_ping", {}, "SCRIPT_NAME" => "/myapp" + assert_equal 200, session.last_response.status + assert_equal "application/json; charset=UTF-8", + session.last_response.content_type + + json = JSON.load(session.last_response.body) + assert json.key?("now") + assert_equal "ok", json["status"] + end + def test_with_custom_path app = build_app(:path => "/_piiiiing") session = Rack::Test::Session.new(app) session.get "/_piiiiing"