From e50907535109dbdbe8f15c3e2fcdf22d90b1332a Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Fri, 24 Jul 2020 10:52:46 -0400 Subject: [PATCH] fix: controllers-admin test --- test/controllers-admin.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/controllers-admin.js b/test/controllers-admin.js index 52ab458986..1b090de2b1 100644 --- a/test/controllers-admin.js +++ b/test/controllers-admin.js @@ -712,7 +712,9 @@ describe('Admin Controllers', function () { request(nconf.get('url') + '/api/flags/' + flagId, { jar: moderatorJar, json: true }, function (err, res, body) { assert.ifError(err); assert(body); - assert.equal(body.reporter.username, 'regular'); + assert(body.reports); + assert(Array.isArray(body.reports)); + assert.equal(body.reports[0].reporter.username, 'regular'); done(); }); });