feat: flag rescinding logic + api method

This commit is contained in:
Julian Lam
2023-10-11 12:06:33 -04:00
parent cc8fe4353d
commit e012edea3b
7 changed files with 62 additions and 1 deletions

View File

@@ -1004,6 +1004,22 @@ describe('Flags', () => {
});
});
describe('.rescind()', () => {
it('should remove a flag\'s report', async () => {
const response = await request({
method: 'delete',
uri: `${nconf.get('url')}/api/v3/flags/2/report`,
jar,
headers: {
'x-csrf-token': csrfToken,
},
resolveWithFullResponse: true,
});
assert.strictEqual(response.statusCode, 200);
});
});
describe('.appendNote()', () => {
it('should append a note to the flag', async () => {
const { response } = await request({