Changeset View
Changeset View
Standalone View
Standalone View
lib/http/routes/finalize-registration-intent.subtest.js
Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | with_stopped_app_prod(async ({ app, mail_api, rest_api }) => { | ||||
{ username: "user", password: "password" }, | { username: "user", password: "password" }, | ||||
options | options | ||||
); | ); | ||||
const user_data = await rest_api.get( | const user_data = await rest_api.get( | ||||
"/api/v1/users/me?format[roles]=expand", | "/api/v1/users/me?format[roles]=expand", | ||||
options | options | ||||
); | ); | ||||
assert(user_data.body.roles); | assert(user_data.roles); | ||||
assert.equal(user_data.body.roles.length, 1); | assert.equal(user_data.roles.length, 1); | ||||
assert.equal(user_data.body.roles[0].body.role, "admin"); | assert.equal(user_data.roles[0].role, "admin"); | ||||
})); | })); | ||||
}); | }); |