Skip to content
This repository was archived by the owner on Jul 5, 2025. It is now read-only.

Commit a0e3f5e

Browse files
committed
test: add case for non-technical user with empty tenantId
1 parent e9ad7dd commit a0e3f5e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

directive/tenant_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,15 @@ func TestSetTenantToContextForTechnicalUsers(t *testing.T) {
6565
expectedTenant: "tenant123",
6666
expectError: false,
6767
},
68+
{
69+
name: "Non-technical user with spiffee (*string empty)",
70+
ctx: openmfpcontext.AddIsTechnicalIssuerToContext(context.Background()),
71+
args: map[string]interface{}{
72+
"tenantId": ptr.To(""),
73+
},
74+
expectedTenant: "",
75+
expectError: false,
76+
},
6877
}
6978

7079
for _, tt := range tests {

0 commit comments

Comments
 (0)