Skip to content

Commit

Permalink
style: formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
DOOduneye committed Oct 7, 2023
1 parent 0f8f6db commit 6a3843f
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions server/tests/user_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,3 @@ func TestGetAllUsers(t *testing.T) {
t.Errorf("Expected status code %d, got %d", http.StatusOK, rec.Code)
}
}

func TestGetUser(t *testing.T) {
e, db := initTestDB()

req := httptest.NewRequest(http.MethodGet, "/api/users/1", nil)
rec := httptest.NewRecorder()
c := e.NewContext(req, rec)

userController := controller.UserController{DB: db}

if err := userController.GetUser(c); err != nil {
t.Errorf("Error handling request: %v", err)
}

if rec.Code != http.StatusOK {
t.Errorf("Expected status code %d, got %d", http.StatusOK, rec.Code)
}
}

0 comments on commit 6a3843f

Please sign in to comment.