mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-31 00:50:45 +01:00
Merge branch 'master' into dev
This commit is contained in:
@@ -135,6 +135,7 @@ namespace Tgstation.Server.Host.Security
|
||||
.Include(x => x.Group)
|
||||
.ThenInclude(x => x!.PermissionSet)
|
||||
.Include(x => x.OAuthConnections)
|
||||
.Include(x => x.OidcConnections)
|
||||
.FirstOrDefaultAsync(cancellationToken);
|
||||
if (user == default)
|
||||
{
|
||||
|
||||
@@ -90,7 +90,8 @@ namespace Tgstation.Server.Host.IO.Tests
|
||||
Assert.IsFalse(await ioManager.FileExists(symlinkedFile, CancellationToken.None));
|
||||
Assert.IsFalse(await ioManager.FileExists(ioManager.ConcatPath(symlinkedDir, "test1.txt"), CancellationToken.None));
|
||||
Assert.IsTrue(await ioManager.FileExists(fileInTargetDir, CancellationToken.None));
|
||||
Assert.IsTrue(expectedBytes.SequenceEqual(await ioManager.ReadAllBytes(fileInTargetDir, CancellationToken.None)));
|
||||
var readResult = await ioManager.ReadAllBytes(fileInTargetDir, CancellationToken.None);
|
||||
Assert.IsTrue(expectedBytes.SequenceEqual(readResult));
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
||||
@@ -10,6 +10,8 @@ using Moq;
|
||||
|
||||
using Newtonsoft.Json;
|
||||
|
||||
using Remora.Discord.Rest.Extensions;
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
@@ -1269,7 +1271,7 @@ namespace Tgstation.Server.Tests.Live.Instance
|
||||
Assert.AreEqual("https://github.com/Cyberboss", embedsResponse.Embed.Author.Url);
|
||||
Assert.IsTrue(DateTimeOffset.TryParse(embedsResponse.Embed.Timestamp, CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out var timestamp));
|
||||
var timestampCheck = startTime < timestamp && endTime > timestamp;
|
||||
Assert.IsTrue(timestampCheck);
|
||||
Assert.IsTrue(timestampCheck, $"Expected between {startTime.ToString("O")} and {endTime.ToString("O")}, got {timestamp.ToString("O")}");
|
||||
Assert.AreEqual("https://github.com/tgstation/tgstation-server", embedsResponse.Embed.Url);
|
||||
Assert.AreEqual(3, embedsResponse.Embed.Fields?.Count);
|
||||
Assert.AreEqual("field1", embedsResponse.Embed.Fields.ElementAt(0).Name);
|
||||
|
||||
Reference in New Issue
Block a user