Skip to content

Commit c9f6ca5

Browse files
authored
use explicit error responses in tests (#485)
1 parent d563e77 commit c9f6ca5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/integration/save_test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -801,6 +801,10 @@ module('integration - Persistence', function (hooks) {
801801
'Lysono Maar',
802802
]);
803803

804+
server.put('/armies/1', () => {
805+
return [400, { 'Content-Type': 'application/json' }];
806+
});
807+
804808
await assert.rejects(army.save());
805809

806810
army.rollbackAttributes();
@@ -851,6 +855,10 @@ module('integration - Persistence', function (hooks) {
851855
name.set('last', 'BadLastName');
852856
address.set('street', 'BadStreet');
853857

858+
server.put('/people/1', () => {
859+
return [400, { 'Content-Type': 'application/json' }];
860+
});
861+
854862
await assert.rejects(mrStark.save());
855863

856864
mrStark.rollbackAttributes();

0 commit comments

Comments
 (0)