mock responses.. example

This commit is contained in:
Lloyd Brookes
2015-11-18 16:37:16 +00:00
parent aab1f04a2f
commit 9f5f969205
10 changed files with 104 additions and 10 deletions

View File

@ -0,0 +1,8 @@
module.exports = [
{
response: {
status: 200,
body: { id: 2, name: 'eucalyptus', maxHeight: 210 }
}
}
]

View File

@ -0,0 +1,23 @@
module.exports = [
{
request: {
method: 'GET'
},
response: {
status: 200,
body: [
{ id: 1, name: 'conifer', maxHeight: 115 },
{ id: 2, name: 'eucalyptus', maxHeight: 210 }
]
}
},
{
request: {
method: 'POST'
},
response: {
status: 201,
location: '/tree/1'
}
}
]