mirror of
https://github.com/gogrlx/nats-server.git
synced 2026-04-02 03:38:42 -07:00
Add User clone test for nil Permissions
This commit is contained in:
@@ -66,6 +66,19 @@ func TestUserClonePermissionsNoLists(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestUserCloneNoPermissions(t *testing.T) {
|
||||
user := &User{
|
||||
Username: "foo",
|
||||
Password: "bar",
|
||||
}
|
||||
|
||||
clone := user.clone()
|
||||
|
||||
if clone.Permissions != nil {
|
||||
t.Fatalf("Expected Permissions to be nil, got: %v", clone.Permissions)
|
||||
}
|
||||
}
|
||||
|
||||
func TestUserCloneNil(t *testing.T) {
|
||||
user := (*User)(nil)
|
||||
clone := user.clone()
|
||||
|
||||
Reference in New Issue
Block a user