From 218baecdf0f8bcc0495a8cdf4fe7300fbcc591c8 Mon Sep 17 00:00:00 2001 From: Jordan Brown Date: Mon, 30 Mar 2020 16:33:54 -0400 Subject: [PATCH] Add an integration test for reading the current user. --- tests/Tgstation.Server.Tests/UsersTest.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tests/Tgstation.Server.Tests/UsersTest.cs b/tests/Tgstation.Server.Tests/UsersTest.cs index 223384846b..5142d6fe24 100644 --- a/tests/Tgstation.Server.Tests/UsersTest.cs +++ b/tests/Tgstation.Server.Tests/UsersTest.cs @@ -20,10 +20,20 @@ namespace Tgstation.Server.Tests public async Task Run(CancellationToken cancellationToken) { + await TestRetrieveCurrentUser(cancellationToken).ConfigureAwait(false); await TestSpamCreation(cancellationToken).ConfigureAwait(false); } + + async Task TestRetrieveCurrentUser(CancellationToken cancellationToken) + { + var user = await this.client.Read(cancellationToken).ConfigureAwait(false); + Assert.IsNotNull(user); + Assert.AreEqual("Admin", user.Name); + Assert.IsNull(user.SystemIdentifier); + Assert.AreEqual(true, user.Enabled); + } - public async Task TestSpamCreation(CancellationToken cancellationToken) + async Task TestSpamCreation(CancellationToken cancellationToken) { ICollection> tasks = new List>();