diff --git a/src/tests/Recyclarr.Cli.Tests/Processors/ErrorHandling/FlurlHttpExceptionHandlerTest.cs b/src/tests/Recyclarr.Cli.Tests/Processors/ErrorHandling/FlurlHttpExceptionHandlerTest.cs index e40a10c9..a18b6e3a 100644 --- a/src/tests/Recyclarr.Cli.Tests/Processors/ErrorHandling/FlurlHttpExceptionHandlerTest.cs +++ b/src/tests/Recyclarr.Cli.Tests/Processors/ErrorHandling/FlurlHttpExceptionHandlerTest.cs @@ -22,15 +22,16 @@ public class FlurlHttpExceptionHandlerTest extractor.GetErrorMessage().Returns(responseContent); await sut.ProcessServiceErrorMessages(extractor); - var logs = log.Messages; - - logs.Should().BeEquivalentTo(new[] - { - "Reason: error one", - "Reason: error two" - }, - o => o.WithStrictOrdering() - ); + var logs = log.Messages.ToList(); + + var expectedSubstrings = new[] + { + "error one", + "error two" + }; + + logs.Should().HaveCount(expectedSubstrings.Length); + logs.Zip(expectedSubstrings).Should().OnlyContain(pair => pair.First.Contains(pair.Second)); } [Test, AutoMockData] @@ -45,13 +46,14 @@ public class FlurlHttpExceptionHandlerTest extractor.GetErrorMessage().Returns(responseContent); await sut.ProcessServiceErrorMessages(extractor); - var logs = log.Messages; + var logs = log.Messages.ToList(); + + var expectedSubstrings = new[] + { + "database is locked\ndatabase is locked" + }; - logs.Should().BeEquivalentTo(new[] - { - "Reason: database is locked\ndatabase is locked" - }, - o => o.WithStrictOrdering() - ); + logs.Should().HaveCount(expectedSubstrings.Length); + logs.Zip(expectedSubstrings).Should().OnlyContain(pair => pair.First.Contains(pair.Second)); } }