REST Service for POPCORN - ILIAS
alex
2025-10-23 594de40ac39ac32d6d526c8c4875dc6665b2d8dc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const expect = require("chai").expect
 
const settings = require("../settings")
const libIlias = require("../lib/libIlias")
const db = require("../lib/db")
const testData = require("./data")
 
/////////////////////////////////////////////////////////////////////////
 
describe("regarding the Kurs LP", function () {
 
   const kurs = testData.kurs // TODO real test
   let kursId = 32212
 
   beforeEach(async function () {
   })
 
   afterEach(async function () {
   })
 
    describe("the function getKursUnterobjektLp", function () {
        it("should deliver the LP for the Kurs Unterobjekte", async function () {
            const res = await db.getKursUnterobjektLp(kursId)
            console.table(res)
            expect(res).to.be.a("array")
            for(const item of res) {
                expect(item).to.have.property("obj_id").and.to.be.a("number")
                expect(item).to.have.property("item_id").and.to.be.a("number")
                expect(item).to.have.property("lpmode").and.to.be.a("number")
                expect(item).to.have.property("item_obj_id").and.to.be.a("number")
                expect(item).to.have.property("usr_id").and.to.be.a("number")
                expect(item).to.have.property("status").and.to.be.a("number")
                expect(item).to.have.property("status_changed").and.to.be.a("date")
            }
        })
    })
 
 
 
})
 
/////////////////////////////////////////////////////////////////////////