RestFixtureTests.PutTests

Included page: .RestFixtureTests.SetUp (edit)

script smartrics.rest.test.fitnesse.fixture.HttpServerFixture
check is started true
reset resources database

Note

This test shows how to pass bespoke headers in the request. In this specific case, the stub echoes back the 'Echo-Header', so that the
following PUT and GET can match it the response.

Table: Rest Fixture http://localhost:9876
setBody <resource><name>name being updated</name><data>data being updated</data></resource>
setHeader
Echo-Header : echoed
PUT
200
Echo-Header : echoed
expected

Echo-Header : echoed
Content-Length : 0
Server : Jetty(6.0.2)
actual
no-body
GET
200
Echo-Header : echoed
expected

Echo-Header : echoed
Set-Cookie : JID="ABC.${a.y}";
Content-Type : application/xml;charset=ISO-8859-1
Content-Length : 83
Server : Jetty(6.0.2)
actual

 /resource/name[text()='name being updated'] <br/>
 /resource/data[text()='data being updated']

expected

<resource><name>name being updated</name><data>data being updated</data></resource>
actual