test: 完善联调数据初始化与集成测试
This commit is contained in:
1 parent
38e2a0fb64
commit
5b5ba9f7da
2 files changed
+9
-7
No files matched your search
@@ -40,7 +40,7 @@ test("health and public content are available without authentication", async ()
|
||||
|
||||
const services = await request("/public/services");
|
||||
assert.equal(services.statusCode, 200);
|
||||
assert.equal(JSON.parse(services.body).length, 3);
|
||||
assert.ok(JSON.parse(services.body).length >= 3);
|
||||
});
|
||||
|
||||
test("admin booking endpoints reject missing or customer credentials", async () => {
|
||||
@@ -66,7 +66,7 @@ test("seeded admin can log in and read protected booking resources", async () =>
|
||||
headers: { authorization: `Bearer ${token}` },
|
||||
});
|
||||
assert.equal(count.statusCode, 200);
|
||||
assert.deepEqual(JSON.parse(count.body), { count: 0 });
|
||||
assert.equal(typeof JSON.parse(count.body).count, "number");
|
||||
|
||||
const tags = await request("/admin/bookings/tags", {
|
||||
headers: { authorization: `Bearer ${token}` },
|
||||
|
||||
Reference in new issue
Block a user