+ statusCodeExpected: HttpStatusCode.NOT_FOUND_404
+ })
+
+ await userLogin(server, { username: 'cyan', password: null }, HttpStatusCode.BAD_REQUEST_400)
+ await userLogin(server, { username: 'cyan', password: '' }, HttpStatusCode.BAD_REQUEST_400)
+ await userLogin(server, { username: 'cyan', password: 'fake' }, HttpStatusCode.BAD_REQUEST_400)
+ })
+
+ it('Should not login kefka with another plugin', async function () {
+ await loginExternal({
+ server,
+ npmName: 'test-external-auth-two',
+ authName: 'external-auth-4',
+ username: 'kefka2',
+ statusCodeExpectedStep2: HttpStatusCode.BAD_REQUEST_400
+ })
+
+ await loginExternal({
+ server,
+ npmName: 'test-external-auth-two',
+ authName: 'external-auth-4',
+ username: 'kefka',
+ statusCodeExpectedStep2: HttpStatusCode.BAD_REQUEST_400
+ })
+ })
+
+ it('Should not login an existing user', async function () {
+ await createUser({
+ url: server.url,
+ accessToken: server.accessToken,
+ username: 'existing_user',
+ password: 'super_password'
+ })
+
+ await loginExternal({
+ server,
+ npmName: 'test-external-auth-two',
+ authName: 'external-auth-6',
+ username: 'existing_user',
+ statusCodeExpectedStep2: HttpStatusCode.BAD_REQUEST_400