From 6138ffe99d016cc311f250bc1555b5403b8b1216 Mon Sep 17 00:00:00 2001
From: alex <alex@alexloehr.net>
Date: Thu, 08 Oct 2026 17:18:04 +0000
Subject: [PATCH] GS-2555

---
 test/testCreateKurs.js |   28 ++++++++++------------------
 1 files changed, 10 insertions(+), 18 deletions(-)

diff --git a/test/testCreateKurs.js b/test/testCreateKurs.js
index 755f244..a10bf6c 100644
--- a/test/testCreateKurs.js
+++ b/test/testCreateKurs.js
@@ -1,33 +1,25 @@
 const expect = require("chai").expect
 
-const settings = require("../settings")
 const libIlias = require("../lib/libIlias")
-const db = require("../lib/db")
 const testData = require("./data")
 
 /////////////////////////////////////////////////////////////////////////
 
-describe("the function anmelden", function () {
+// Skipped: the ILIAS PHP component does not implement course creation yet
+// (php/globus-ilias-rest/login.php -> createKurs() throws "not implemented").
+// There is also no deleteKurs() for cleanup, so running this test would leave
+// a real course behind. Enable once both exist.
+describe("the function createKurs", function () {
 
-   const kurs = testData.kurs // TODO
-   let kursId = 31938
+   const kurs = testData.kurs
 
-   beforeEach(async function () {
-   })
-
-   afterEach(async function () {
-   })
-
-   it("should create a new Kurs in ILIAS", async function () {
-      console.log("++createKurs", kurs)
+   it.skip("should create a new Kurs in ILIAS", async function () {
       const res = await libIlias.createKurs(kurs)
-      console.dir(res, {depth: null})
-      // expect(res).to.have.property("status").and.to.equal("ok")
-      // expect(res.command).to.equal("anmelden")
-      // expect(res.method).to.equal("POST")
+      expect(res).to.have.property("status").and.to.equal("ok")
+      expect(res.command).to.equal("createKurs")
+      expect(res).to.have.property("ref_id").and.to.be.a("number").above(0)
    })
 
 })
 
 /////////////////////////////////////////////////////////////////////////
-

--
Gitblit v1.8.0