Skip to content

Commit a36c38c

Browse files
committed
add a 415 error?
1 parent a1cbae0 commit a36c38c

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

Diff for: test/integration/fruits-integration-test.js

+15
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,21 @@ function runTests (route) {
8585
});
8686
});
8787

88+
// POST a fruit
89+
test('POST /api/fruit/ - send non json', t => {
90+
t.plan(4);
91+
const fruitData = '{name: \'Banana\', stock: \'10\'}';
92+
93+
supertest(route)
94+
.post('/api/fruits')
95+
.send(fruitData)
96+
.expect(415)
97+
.then(response => {
98+
console.log(response);
99+
t.end();
100+
});
101+
});
102+
88103
// PUT a fruit
89104
test('PUT /api/fruit/:id', t => {
90105
// t.plan(0);

0 commit comments

Comments
 (0)