add env slug to make expect more strict

This commit is contained in:
Maidul Islam
2024-02-19 16:08:21 -05:00
parent 35d589a15f
commit e4b89371f0

View File

@@ -103,8 +103,11 @@ describe("Secret Import Router", async () => {
});
test("Update secret import position", async () => {
const createdImport1 = await createSecretImport("/", "dev");
const createdImport2 = await createSecretImport("/", "staging");
const devImportDetails = { path: "/", envSlug: "dev" };
const stagingImportDetails = { path: "/", envSlug: "staging" };
const createdImport1 = await createSecretImport(devImportDetails.path, devImportDetails.envSlug);
const createdImport2 = await createSecretImport(stagingImportDetails.path, stagingImportDetails.envSlug);
const updateImportRes = await testServer.inject({
method: "PATCH",
@@ -133,7 +136,7 @@ describe("Secret Import Router", async () => {
position: 2,
importEnv: expect.objectContaining({
name: expect.any(String),
slug: expect.any(String),
slug: expect.stringMatching(devImportDetails.envSlug),
id: expect.any(String)
})
})