fix(curriculum): quality assurance test query id (#54646)

This commit is contained in:
Anna
2024-06-15 11:43:21 +05:30
committed by GitHub
parent 0916d1bb49
commit c132ef80f4
@@ -205,6 +205,11 @@ async (getUserInput) => {
const getMultiple = await $.get(url + '?created_by=Alice&assigned_to=Bob');
assert.isArray(getMultiple);
assert.lengthOf(getMultiple, 2);
const copyId = getMultiple[0]._id;
const getById = await $.get(url + `?_id=${copyId}`);
assert.isArray(getById);
assert.lengthOf(getById, 1);
assert.equal(getById[0]._id, copyId, 'should be able to query a document by _id')
} catch (err) {
throw new Error(err.responseText || err.message);
}