REST Service for POPCORN - ILIAS
alex
2025-11-28 3d93817b855dcbe1c4d2573faa2901ae3db0f7d8
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,10 +64,8 @@
      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")
@@ -93,9 +79,8 @@
         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)