func TestPutGOB(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", "gob", NewTestHandler("putgob", assert))
	assert.Nil(err)
	// Perform test requests.
	req := restaudit.NewRequest("POST", "/base/test/gob")
	reqData := TestCounterData{"test", 4711}
	req.MarshalBody(assert, restaudit.ApplicationGOB, reqData)
	resp := ts.DoRequest(req)
	resp.AssertStatusEquals(200)
	respData := TestCounterData{}
	resp.AssertUnmarshalledBody(&respData)
	assert.Equal(respData, reqData)
}
// TestPutGOB tests the PUT command with a GOB payload and result.
TestPutGOB tests the PUT command with a GOB payload and result.
// TestPutGOB tests the PUT command with a GOB payload and result .
func TestPutGOB(t *testing.T) {
	assert := audit.NewTestingAssertion(t, true)
	mux := newMultiplexer(assert)
	ts := restaudit.StartServer(mux, assert)
	defer ts.Close()
	err := mux.Register("test", "gob", NewTestHandler("putgob", assert))
	assert.Nil(err)
	req := restaudit.NewRequest("POST", "/base/test/gob")
	reqData := TestCounterData{"test", 4711}
	req.MarshalBody(assert, restaudit.ApplicationGOB, reqData)
	resp := ts.DoRequest(req)
	resp.AssertStatusEquals(200)
	respData := TestCounterData{}
	resp.AssertUnmarshalledBody(&respData)
	assert.Equal(respData, reqData)
}
func TestPutGOB ( 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 ( " " , " " ) reqData := TestCounterData { " " , 4711 } req . MarshalBody ( assert , restaudit . ApplicationGOB , reqData ) resp := ts . DoRequest ( req ) resp . AssertStatusEquals ( 200 ) respData := TestCounterData { } resp . AssertUnmarshalledBody ( & respData ) assert . Equal ( respData , reqData ) }
TestPutGOB tests the PUT command with a GOB payload and result.
TestPutGOB tests the PUT command with a GOB payload and result .
// Setup the test server. // Perform test requests.