v11_jaimetest/pkg/app/app_test.go
jaime merino 491131321a
Some checks failed
/ upload-many (push) Failing after 1m16s
test inti
2026-01-28 16:21:17 +01:00

44 lines
650 B
Go

package app
import (
"context"
"testing"
)
func TestUserOK(t *testing.T) {
type args struct {
ctx context.Context
user *User
}
tests := []struct {
name string
args args
want bool
}{
{
name: "test ok",
args: args{
ctx: context.TODO(),
user: &User{
Name: "hola",
},
},
want: true,
},
{
name: "test not found",
args: args{
ctx: context.TODO(),
user: nil,
},
want: false,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
if got := UserOK(tt.args.ctx, tt.args.user); got != tt.want {
t.Errorf("UserOK() = %v, want %v", got, tt.want)
}
})
}
}