Skip to content
Snippets Groups Projects
Commit 33f8106f authored by ko_oler's avatar ko_oler
Browse files

fix linter

parent c33c1675
No related branches found
No related tags found
No related merge requests found
......@@ -139,10 +139,10 @@ func TestCaller(t *testing.T) {
field zap.Field
want zap.Field
}{
{name: "system object", field: Caller(nil, WithObject(user)), want: zap.Reflect("caller", oid)},
{name: "object id", field: Caller(nil, WithObject(userId)), want: zap.Reflect("caller", oid)},
{name: "string", field: Caller(nil, WithObject(oid.String())), want: zap.Reflect("caller", oid)},
{name: "invalid", field: Caller(nil), want: zap.Reflect("caller", (*id.ObjectId)(nil))},
{name: "system object", field: Caller(context.TODO(), WithObject(user)), want: zap.Reflect("caller", oid)},
{name: "object id", field: Caller(context.TODO(), WithObject(userId)), want: zap.Reflect("caller", oid)},
{name: "string", field: Caller(context.TODO(), WithObject(oid.String())), want: zap.Reflect("caller", oid)},
{name: "invalid", field: Caller(context.TODO()), want: zap.Reflect("caller", (*id.ObjectId)(nil))},
{name: "context", field: Caller(ctx), want: zap.Reflect("caller", id.MustObjectId(auth.GetPrincipal(ctx)))},
{name: "invalid context", field: Caller(context.TODO()), want: zap.Reflect("caller", (*id.ObjectId)(nil))},
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment