Skip to content

Commit

Permalink
use explicit error responses in tests (#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
dwickern authored Feb 7, 2024
1 parent d563e77 commit c9f6ca5
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/integration/save_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,10 @@ module('integration - Persistence', function (hooks) {
'Lysono Maar',
]);

server.put('/armies/1', () => {
return [400, { 'Content-Type': 'application/json' }];
});

await assert.rejects(army.save());

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

server.put('/people/1', () => {
return [400, { 'Content-Type': 'application/json' }];
});

await assert.rejects(mrStark.save());

mrStark.rollbackAttributes();
Expand Down

0 comments on commit c9f6ca5

Please sign in to comment.