| | |
| | | |
| | | it("should return the offline or online status of a kurs", async function () { |
| | | const url = getUrl(ref_id) |
| | | console.log(url) |
| | | const res = await fetch(url, { |
| | | method: "GET", |
| | | // body: JSON.stringify(body), |
| | |
| | | 'Content-Type': 'application/json', // Indicate JSON data |
| | | }, |
| | | }) |
| | | // console.log(res) |
| | | const data = await res.json() |
| | | console.log(data) |
| | | |
| | | expect(data).to.be.a("object").and.to.have.property("offline") |
| | | }) |
| | |
| | | |
| | | it("should set the offline or online status of a kurs", async function () { |
| | | const url = getUrl(ref_id) |
| | | console.log(url) |
| | | const body = {offline: 0} |
| | | const res = await fetch(url, { |
| | | method: "POST", |
| | |
| | | 'Content-Type': 'application/json', // Indicate JSON data |
| | | }, |
| | | }) |
| | | // console.log(res) |
| | | const data = await res.json() |
| | | console.log(data) |
| | | expect(data).to.be.a("object").and.to.have.property("offline") |
| | | }) |
| | | |