func TestMethodNotSupported(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	// Setup the test server.
	mux := newMultiplexer(assert)
	ts := restaudit.StartServer(mux, assert)
	defer ts.Close()
	err := mux.Register("test", "no-options", NewTestHandler("no-options", assert))
	assert.Nil(err)
	// Perform test requests.
	req := restaudit.NewRequest("OPTIONS", "/base/test/no-options")
	resp := ts.DoRequest(req)
	resp.AssertStatusEquals(http.StatusMethodNotAllowed)
	resp.AssertBodyContains("no-options")
}
// TestMethodNotSupported tests the handling of a not support HTTP method.
TestMethodNotSupported tests the handling of a not support HTTP method.
// TestMethodNotSupported tests the handling of a not support HTTP method .
func TestMethodNotSupported(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	mux := newMultiplexer(assert)
	ts := restaudit.StartServer(mux, assert)
	defer ts.Close()
	err := mux.Register("test", "no-options", NewTestHandler("no-options", assert))
	assert.Nil(err)
	req := restaudit.NewRequest("OPTIONS", "/base/test/no-options")
	resp := ts.DoRequest(req)
	resp.AssertStatusEquals(http.StatusMethodNotAllowed)
	resp.AssertBodyContains("no-options")
}
func TestMethodNotSupported ( t * testing . T ) { assert := audit . NewTestingAssertion ( t , true ) mux := newMultiplexer ( assert ) ts := restaudit . StartServer ( mux , assert ) defer ts . Close ( ) err := mux . Register ( " " , " " , NewTestHandler ( " " , assert ) ) assert . Nil ( err ) req := restaudit . NewRequest ( " " , " " ) resp := ts . DoRequest ( req ) resp . AssertStatusEquals ( http . StatusMethodNotAllowed ) resp . AssertBodyContains ( " " ) }
TestMethodNotSupported tests the handling of a not support HTTP method.
TestMethodNotSupported tests the handling of a not support HTTP method .
// Setup the test server. // Perform test requests.