diff --git a/tests/Bifrost.Web.Tests/MergePreviewTests.cs b/tests/Bifrost.Web.Tests/MergePreviewTests.cs index 47e6b54..3e9d8c8 100644 --- a/tests/Bifrost.Web.Tests/MergePreviewTests.cs +++ b/tests/Bifrost.Web.Tests/MergePreviewTests.cs @@ -17,6 +17,17 @@ public sealed class MergePreviewTests private static MergePlan Plan(IEnumerable entries, IReadOnlyDictionary? left = null) => new([], [.. entries], left ?? new Dictionary()); + [Fact] + public void The_provider_conflict_names_the_providers_and_says_to_prove_that_side_again_after_unlinking() + { + // The conflict is read from the login list held with the proofs, which unlinking does not change until the member proves again. + var words = MergePreview.ProviderConflict(["Discord", "Twitch"]); + + Assert.Contains("Discord and Twitch", words); + Assert.Contains("Unlink", words); + Assert.Contains("prove that account again", words); + } + [Fact] public void Every_block_code_has_its_own_words_and_none_names_an_account() { diff --git a/tests/Bifrost.Web.Tests/MergeWordingTests.cs b/tests/Bifrost.Web.Tests/MergeWordingTests.cs index 7f1a147..6f63e89 100644 --- a/tests/Bifrost.Web.Tests/MergeWordingTests.cs +++ b/tests/Bifrost.Web.Tests/MergeWordingTests.cs @@ -43,6 +43,17 @@ public sealed class MergeWordingTests [InlineData("malformed or mismatched receipt")] public void Every_outcome_the_saga_stores_has_words(string outcome) => Assert.False(string.IsNullOrWhiteSpace(MergeWording.Outcome(outcome)), outcome); + [Theory] + [InlineData("operator_failed", "ended")] + [InlineData("undo_operator_abandoned", "merge stands")] + public void An_operators_settle_has_its_own_words_not_the_retry_line(string outcome, string says) + { + var words = MergeWording.Outcome(outcome); + + Assert.Contains(says, words); + Assert.DoesNotContain("try again", words); + } + [Theory] [InlineData("HTTP 502")] [InlineData("HEIMDALL FREE TEXT")]