Skip to content

Commit

Permalink
Comment unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
voltgizerz committed Jun 22, 2024
1 parent 643695a commit 29259e4
Showing 1 changed file with 27 additions and 33 deletions.
60 changes: 27 additions & 33 deletions internal/app/api/handler/user_handler_test.go
Original file line number Diff line number Diff line change
@@ -1,37 +1,31 @@
package handler

import (
"testing"
// func TestUserHandler_Login(t *testing.T) {
// type args struct {
// c fiber.Ctx
// }
// tests := []struct {
// name string
// args args
// wantErr bool
// setup func(mockObj *MockObject)
// }{{}}
// for _, tt := range tests {
// ctrl, mockObj := NewMock(t)
// if tt.setup != nil {
// tt.setup(mockObj)
// }
// defer ctrl.Finish()

"github.com/gofiber/fiber/v3"
)
// userHandler := &UserHandler{
// authService: mockObj.MockAuthService,
// userService: mockObj.MockUserService,
// }

func TestUserHandler_Login(t *testing.T) {
type args struct {
c fiber.Ctx
}
tests := []struct {
name string
args args
wantErr bool
setup func(mockObj *MockObject)
}{{}}
for _, tt := range tests {
ctrl, mockObj := NewMock(t)
if tt.setup != nil {
tt.setup(mockObj)
}
defer ctrl.Finish()

userHandler := &UserHandler{
authService: mockObj.MockAuthService,
userService: mockObj.MockUserService,
}

t.Run(tt.name, func(t *testing.T) {
if err := userHandler.Login(tt.args.c); (err != nil) != tt.wantErr {
t.Errorf("UserHandler.Login() error = %v, wantErr %v", err, tt.wantErr)
}
})
}
}
// t.Run(tt.name, func(t *testing.T) {
// if err := userHandler.Login(tt.args.c); (err != nil) != tt.wantErr {
// t.Errorf("UserHandler.Login() error = %v, wantErr %v", err, tt.wantErr)
// }
// })
// }
// }

0 comments on commit 29259e4

Please sign in to comment.