diff --git a/daml-script/daml/Daml/Script.daml b/daml-script/daml/Daml/Script.daml index 2c528356ecda..a6edb6f038d1 100644 --- a/daml-script/daml/Daml/Script.daml +++ b/daml-script/daml/Daml/Script.daml @@ -763,7 +763,7 @@ data User = User with id : Text primaryParty : Optional Party - deriving (Show, Eq) + deriving (Show, Eq, Ord) -- | HIDE The rights of a user data UserRight diff --git a/daml-script/test/daml/ScriptTest.daml b/daml-script/test/daml/ScriptTest.daml index b36a85ab5b35..588ac6429859 100644 --- a/daml-script/test/daml/ScriptTest.daml +++ b/daml-script/test/daml/ScriptTest.daml @@ -458,10 +458,10 @@ testUserManagement = do u <- getUser "nonexistent" u === None users <- listUsers - users === [User "u1" None, User "u2" None, participantAdmin] + sort users === [participantAdmin, User "u1" None, User "u2" None] deleteUser "u1" users <- listUsers - users === [User "u2" None, participantAdmin] + sort users === [participantAdmin, User "u2" None] deleteUser "u2" users <- listUsers users === [participantAdmin]