Skip to content

Commit

Permalink
removing test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ludeknovy committed Nov 10, 2023
1 parent d816ee4 commit 292a02f
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 18 deletions.
9 changes: 0 additions & 9 deletions src/server/routes/test-data-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,6 @@ export class TestDataSetup {
const { id } = await db.one(getUser("test-user"))
await db.any(createNewApiToken(TOKEN, "test-token", id))
res.status(StatusCode.Ok).json({ token: TOKEN })
} else if (state === States.ExistingScenarioShareToken) {
const token = uuidv4()
await db.any(createNewProject("test-project"))
const project = await db.one(getProject("test-project"))
await db.any(assignAllAdminsAsProjectMembers(project.id))
await db.any(createNewScenario("test-project", "test-scenario"))
await db.none(createScenarioShareToken("test-project", "test-scenario",
token, uuidv4(), "note"))
res.status(StatusCode.Ok).json({ token })
} else {
res.sendStatus(StatusCode.BadRequest)
}
Expand Down
9 changes: 0 additions & 9 deletions src/tests/integration/scenario.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,5 @@ describe("Scenario", () => {
.set("Accept", "application/json")
.expect(StatusCode.NotFound)
})

it("should be able to delete scenario", async() => {
const { data: { token } } = await stateSetup(States.ExistingScenarioShareToken)
await request(__server__)
.delete(`/api/projects/test-project/scenarios/test-scenario/share-token/${token}`)
.set(__tokenHeaderKey__, credentials.token)
.set("Accept", "application/json")
.expect(StatusCode.NotFound)
})
})
})

0 comments on commit 292a02f

Please sign in to comment.