Thanks to visit codestin.com
Credit goes to github.com

Skip to content

chore(site): Add unit tests, mocks #514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 12 commits into from
Mar 23, 2022
Prev Previous commit
Next Next commit
Make mock entities reference each other
  • Loading branch information
presleyp committed Mar 22, 2022
commit 3633dfccb652eec6f46d0e689e8fe2782bbdc955
22 changes: 11 additions & 11 deletions site/src/test_helpers/entities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,33 +11,33 @@ export const MockUser: UserResponse = {
created_at: "",
}

export const MockProject: Project = {
id: "test-project",
export const MockOrganization: Organization = {
id: "test-org",
name: "Test Organization",
created_at: "",
updated_at: "",
organization_id: "test-org",
name: "Test Project",
provisioner: "test-provisioner",
active_version_id: "",
}

export const MockProvisioner: Provisioner = {
id: "test-provisioner",
name: "Test Provisioner",
}

export const MockOrganization: Organization = {
id: "test-org",
name: "Test Organization",
export const MockProject: Project = {
id: "test-project",
created_at: "",
updated_at: "",
organization_id: MockOrganization.id,
name: "Test Project",
provisioner: MockProvisioner.id,
active_version_id: "",
}

export const MockWorkspace: Workspace = {
id: "test-workspace",
name: "Test-Workspace",
created_at: "",
updated_at: "",
project_id: "test-project",
owner_id: "test-user",
project_id: MockProject.id,
owner_id: MockUser.id
}