- it('Should display the correct configuration', async function () {
- const res = await getConfig(server.url)
+ it('Should not login kefka with another plugin', async function () {
+ await loginExternal({
+ server,
+ npmName: 'test-external-auth-two',
+ authName: 'external-auth-4',
+ username: 'kefka2',
+ expectedStatusStep2: HttpStatusCode.BAD_REQUEST_400
+ })
+
+ await loginExternal({
+ server,
+ npmName: 'test-external-auth-two',
+ authName: 'external-auth-4',
+ username: 'kefka',
+ expectedStatusStep2: HttpStatusCode.BAD_REQUEST_400
+ })
+ })
+
+ it('Should not login an existing user', async function () {
+ await server.users.create({ username: 'existing_user', password: 'super_password' })
+
+ await loginExternal({
+ server,
+ npmName: 'test-external-auth-two',
+ authName: 'external-auth-6',
+ username: 'existing_user',
+ expectedStatusStep2: HttpStatusCode.BAD_REQUEST_400
+ })
+ })