+ it('Should be able to login with this user', async function () {
+ accessTokenUser = await userLogin(server, user)
+ })
+
+ it('Should be able to get user information', async function () {
+ const res1 = await getMyUserInformation(server.url, accessTokenUser)
+ const userMe: User = res1.body
+
+ const res2 = await getUserInformation(server.url, server.accessToken, userMe.id)
+ const userGet: User = res2.body
+
+ for (const user of [ userMe, userGet ]) {
+ expect(user.username).to.equal('user_1')
+ expect(user.email).to.equal('user_1@example.com')
+ expect(user.nsfwPolicy).to.equal('display')
+ expect(user.videoQuota).to.equal(2 * 1024 * 1024)
+ expect(user.roleLabel).to.equal('User')
+ expect(user.id).to.be.a('number')
+ expect(user.account.displayName).to.equal('user_1')
+ expect(user.account.description).to.be.null
+ }
+
+ expect(userMe.adminFlags).to.be.undefined
+ expect(userGet.adminFlags).to.equal(UserAdminFlag.BY_PASS_VIDEO_AUTO_BLACKLIST)
+ })