Files
hiring-test-one/example/mock/mocks/tree.mock.js

26 lines
487 B
JavaScript
Raw Normal View History

2015-11-18 16:37:16 +00:00
module.exports = [
2015-11-19 16:03:01 +00:00
/* CREATE (409 CONFLICT - should be called on the collection) */
2015-11-18 16:37:16 +00:00
{
2015-11-19 16:03:01 +00:00
request: { method: 'POST' },
response: { status: 409 }
},
/* READ */
{
request: { method: 'GET' },
2015-11-18 16:37:16 +00:00
response: {
status: 200,
body: { id: 2, name: 'eucalyptus', maxHeight: 210 }
}
2015-11-19 16:03:01 +00:00
},
/* UPDATE */
{
request: { method: 'PUT' },
response: { status: 204 }
},
/* DELETE */
{
request: { method: 'DELETE' },
response: { status: 204 }
2015-11-18 16:37:16 +00:00
}
]