From 907d1e43a443eb7bdcf7c74228fe24e84aa05a22 Mon Sep 17 00:00:00 2001 From: brontolosone <177225737+brontolosone@users.noreply.github.com> Date: Fri, 13 Sep 2024 17:30:35 +0000 Subject: [PATCH] test: /users/current should return preferences for an extended metadata request --- test/integration/api/users.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/integration/api/users.js b/test/integration/api/users.js index 08857f538..d2dc1c2a3 100644 --- a/test/integration/api/users.js +++ b/test/integration/api/users.js @@ -416,6 +416,15 @@ describe('api: /users', () => { .expect(200) .then(({ body }) => body.email.should.equal('chelsea@getodk.org'))))); + it('should return preferences for an extended metadata request', testService((service) => + service.login('alice', (asAlice) => + asAlice.get('/v1/users/current') + .set('X-Extended-Metadata', 'true') + .expect(200) + .then(({ body }) => { + body.preferences.should.eql({ site: {}, projects: {} }); + })))); + it('should not return sidewide verbs if not extended', testService((service) => service.login('alice', (asAlice) => asAlice.get('/v1/users/current')