Skip to content

Commit

Permalink
PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
davidbloss committed Aug 9, 2024
1 parent b242187 commit 85fb7b9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
9 changes: 3 additions & 6 deletions src/cmd/team_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ func Test_TeamCRUD(t *testing.T) {
}
teamId, err := createTeam(teamToCreate)
if err != nil {
t.Error(err)
t.FailNow()
t.Fatal(err)
}

// Get Team
createdTeam, err := getTeam(teamId)
if err != nil {
t.Error(err)
t.FailNow()
t.Fatal(err)
}
if createdTeam.Name != teamToCreate.Name ||
createdTeam.Responsibilities != *teamToCreate.Responsibilities {
Expand All @@ -44,8 +42,7 @@ func Test_TeamCRUD(t *testing.T) {
updatedTeamId, err := updateTeam(teamId, teamToUpdate)
if err != nil {
_ = deleteTeam(string(createdTeam.Id))
t.Error(err)
t.FailNow()
t.Fatal(err)
}
if string(createdTeam.Id) != updatedTeamId {
t.Errorf("Update 'team' failed, expected returned ID '%s' but got '%s'", string(createdTeam.Id), updatedTeamId)
Expand Down
9 changes: 3 additions & 6 deletions src/cmd/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ func Test_UserCRUD(t *testing.T) {
// Create User
userId, err := createUser(expectedUser)
if err != nil {
t.Error(err)
t.FailNow()
t.Fatal(err)
}

// Get User
createdUser, err := getUser(userId)
if err != nil {
t.Error(err)
t.FailNow()
t.Fatal(err)
}
if createdUser.Name != expectedUser.Name ||
createdUser.Email != expectedUser.Email ||
Expand All @@ -48,8 +46,7 @@ func Test_UserCRUD(t *testing.T) {
}
updatedUserId, err := updateUser(string(createdUser.Id), expectedUpdatedUser)
if err != nil {
t.Error(err)
t.FailNow()
t.Fatal(err)
}
if string(createdUser.Id) != updatedUserId {
t.Errorf("Update 'user' failed, expected returned ID '%s' but got '%s'", string(createdUser.Id), updatedUserId)
Expand Down

0 comments on commit 85fb7b9

Please sign in to comment.