test: update outdated test cases

This commit is contained in:
KernelDeimos 2025-01-13 11:38:00 -05:00
parent 9d9d97fd00
commit c9215d9e86
3 changed files with 11 additions and 2 deletions

View File

@ -45,7 +45,7 @@ module.exports = {
try {
await t.delete('test_delete_dir');
} catch (e) {
expect(e.response.status).equal(400);
expect(e.response.status).equal(422);
threw = true;
}
expect(threw).true;

View File

@ -41,6 +41,12 @@ const verify_fsentry = async (t, o) => {
expect(typeof o.uid).equal('string');
});
for ( const k of _bitBooleans ) {
if ( k === 'is_dir' ) {
await t.case(`is_dir is true or false`, () => {
expect(o[k]).oneOf([true, false], `${k} should be true or false`);
});
continue;
}
await t.case(`${k} is 0 or 1`, () => {
expect(o[k]).oneOf([0, 1], `${k} should be 0 or 1`);
});

View File

@ -60,7 +60,10 @@ module.exports = {
await t.read('i-do-not-exist.txt');
} catch (e) {
expect(e.response.status).equal(404);
expect(e.response.data).deep.equal({ message: 'Path not found.' });
expect(e.response.data).deep.equal({
message: 'File or directory not found.',
code: 'subject_does_not_exist',
});
threw = true;
}
expect(threw).true;