feat: 增加模板升级预览与显式升级
This commit is contained in:
1 parent
388032000a
commit
44b6f6db64
5 files changed
+114
No files matched your search
@@ -67,6 +67,13 @@ test("admin can install a template and public workspace exposes enabled configur
|
||||
assert.equal(installed.statusCode, 201);
|
||||
assert.equal(JSON.parse(installed.body).template.key, "personal");
|
||||
try {
|
||||
const previewUnauthorized = await request("/admin/workspace/template/preview");
|
||||
assert.equal(previewUnauthorized.statusCode, 401);
|
||||
const preview = await request("/admin/workspace/template/preview", {
|
||||
headers: { authorization: `Bearer ${token}` },
|
||||
});
|
||||
assert.equal(preview.statusCode, 200);
|
||||
assert.equal(JSON.parse(preview.body).canUpgrade, false);
|
||||
const workspace = await request("/admin/workspace", {
|
||||
headers: { authorization: `Bearer ${token}` },
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user