diff --git a/middleware_test.go b/middleware_test.go index 6626e97..7b38bdd 100644 --- a/middleware_test.go +++ b/middleware_test.go @@ -104,6 +104,7 @@ func TestSession(t *testing.T) { {Session: proto.SessionType_User}, {Session: proto.SessionType_User, Admin: true}, {Session: proto.SessionType_Admin}, + {Session: proto.SessionType_Admin, Admin: true}, {Session: proto.SessionType_Admin, AccessKey: AccessKey}, {Session: proto.SessionType_Service}, {Session: proto.SessionType_Service, AccessKey: AccessKey}, @@ -128,6 +129,9 @@ func TestSession(t *testing.T) { claims = map[string]any{"account": address} case proto.SessionType_Admin: claims = map[string]any{"account": WalletAddress, "admin": true} + if tc.Admin { + claims = map[string]any{"admin": true} + } case proto.SessionType_Service: claims = map[string]any{"service": ServiceName} }