Skip to content

Commit

Permalink
Fixed UT assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
AbdulWahab3181 committed Jul 4, 2024
1 parent 51ec708 commit 41f264b
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions handlers/workspaces_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1226,10 +1226,8 @@ func TestGetUserDropdownWorkspaces(t *testing.T) {
db.TestDB.CreateOrEditPerson(person)
db.TestDB.CreateOrEditPerson(person2)

workspaceUuid := "workspace_uuid"

workspace := db.Workspace{
Uuid: workspaceUuid,
Uuid: "workspace_uuid",
Name: "workspace_name",
OwnerPubKey: "person.OwnerPubkey",
Github: "gtihub",
Expand Down Expand Up @@ -1287,13 +1285,13 @@ func TestGetUserDropdownWorkspaces(t *testing.T) {
t.Fatal(err)
}

fmt.Println("workspaceUuid: ", workspaceUuid)

updatedWorkspace := db.TestDB.GetWorkspaceByUuid(workspaceUuid)
updatedWorkspaces := []db.Workspace{updatedWorkspace}

assert.NotEmpty(t, responseWorkspaces)
assert.Equal(t, updatedWorkspaces, responseWorkspaces)
assert.Equal(t, workspace.Uuid, responseWorkspaces[0].Uuid)
assert.Equal(t, workspace.Name, responseWorkspaces[0].Name)
assert.Equal(t, workspace.OwnerPubKey, responseWorkspaces[0].OwnerPubKey)
assert.Equal(t, workspace.Github, responseWorkspaces[0].Github)
assert.Equal(t, workspace.Website, responseWorkspaces[0].Website)
assert.Equal(t, workspace.Description, responseWorkspaces[0].Description)
})
}

Expand Down

0 comments on commit 41f264b

Please sign in to comment.