From 3fce3e400fd44d3b6f345a31413e0ad2b7724107 Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Mon, 17 Nov 2025 17:42:43 +0000
Subject: [PATCH] GS-2373

---
 test/testConnect.js |   21 +++------------------
 1 files changed, 3 insertions(+), 18 deletions(-)

diff --git a/test/testConnect.js b/test/testConnect.js
index 8102de0..83c4844 100644
--- a/test/testConnect.js
+++ b/test/testConnect.js
@@ -3,10 +3,7 @@
  */
 
 const expect = require("chai").expect
-
 const settings = require("../settings")
-const libIlias = require("../lib/libIlias")
-const db = require("../lib/db");
 
 /////////////////////////////////////////////////////////////////////////
 
@@ -15,13 +12,6 @@
    const urlS = settings.ilias.url
    const urlD = new URL(urlS)
    const url = urlD.origin
-
-
-   beforeEach(async function () {
-   })
-
-   afterEach(async function () {
-   })
 
    describe("the ILIAS URL", function () {
       it("should be accessible", async function () {
@@ -41,7 +31,6 @@
       it("should be accessible", async function () {
          const db = require("../lib/db")
          const res = await db.getUsers(0, 1)
-         // console.log(res)
 
          expect(res).to.be.a("object")
          expect(res.total).to.be.a("number").above(0)
@@ -63,7 +52,6 @@
       it("should respond to a ping request", async function () {
          const libIlias = require("../lib/libIlias")
          const res = await libIlias.ping()
-         // console.log(res)
 
          expect(res).to.be.a("object")
          expect(res.method).to.equal("GET")
@@ -76,26 +64,23 @@
       it("should be accessible through GET /version", async function () {
          const urlR = `${settings.restUrl}/api/version`
          const res = await fetch(urlR)
-         // console.log(res)
 
          const data = await res.json()
-         // console.log(data)
          expect(data).to.be.a("object")
          expect(data).to.have.property("version")
          expect(data.version).to.be.a("string")
       })
-      it("should not be accessible without TOKEN", async function () {
+      it("should not be accessible without a TOKEN", async function () {
          const urlR = `${settings.restUrl}/api/user?offset=0&limit=1`
          const res = await fetch(urlR)
          expect(res.status).to.equal(403)
       })
-      it("should be accessible with TOKEN", async function () {
+      it("should be accessible with a TOKEN", async function () {
          const urlR = `${settings.restUrl}/api/user?offset=0&limit=1&token=${settings.authtoken}`
          const res = await fetch(urlR)
          expect(res.status).to.equal(200)
-         const data = await res.json()
-         // console.log(data)
 
+         const data = await res.json()
          expect(data).to.be.a("object")
          expect(data.total).to.be.a("number").above(0)
          expect(data.offset).to.equal(0)

--
Gitblit v1.8.0