From 00984c8f421c328b40ec84ebae8985b85ee1d051 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Tue, 15 Feb 2022 17:01:03 -0500 Subject: [PATCH] Minor sanity check in user/group/perm test --- tests/Tgstation.Server.Tests/UsersTest.cs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/Tgstation.Server.Tests/UsersTest.cs b/tests/Tgstation.Server.Tests/UsersTest.cs index cdded81e86..b09873bc12 100644 --- a/tests/Tgstation.Server.Tests/UsersTest.cs +++ b/tests/Tgstation.Server.Tests/UsersTest.cs @@ -1,4 +1,4 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; +using Microsoft.VisualStudio.TestTools.UnitTesting; using System; using System.Collections.Generic; using System.Linq; @@ -193,6 +193,17 @@ namespace Tgstation.Server.Tests Assert.AreEqual(1, group.Users.Count); Assert.AreEqual(testUser2.Id, group.Users.First().Id); Assert.IsNotNull(group.PermissionSet); + + testUserUpdate.Group = null; + testUserUpdate.PermissionSet = new PermissionSet + { + AdministrationRights = RightsHelper.AllRights(), + InstanceManagerRights = RightsHelper.AllRights(), + }; + + testUser2 = await serverClient.Users.Update(testUserUpdate, cancellationToken); + Assert.IsNull(testUser2.Group); + Assert.IsNotNull(testUser2.PermissionSet); } async Task TestCreateSysUser(CancellationToken cancellationToken)