Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit 5235620

Browse files
Adding a test for session matching
1 parent 0c400e7 commit 5235620

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/GitHub.InlineReviews.UnitTests/Services/PullRequestSessionManagerTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,19 @@ public async Task GetSessionReturnsSameSessionForSamePullRequest()
770770
Assert.That(result1, Is.Not.SameAs(result3));
771771
}
772772

773+
[Test]
774+
public async Task GetSessionReturnsSameSessionForSamePullRequestOwnerCaseMismatch()
775+
{
776+
var target = CreateTarget();
777+
var newModel = CreatePullRequestModel(NotCurrentBranchPullRequestNumber);
778+
var result1 = await target.GetSession("owner", "repo", 5);
779+
var result2 = await target.GetSession("Owner", "repo", 5);
780+
var result3 = await target.GetSession("owner", "repo", 6);
781+
782+
Assert.That(result1, Is.SameAs(result2));
783+
Assert.That(result1, Is.Not.SameAs(result3));
784+
}
785+
773786
[Test]
774787
public async Task SessionCanBeCollected()
775788
{

0 commit comments

Comments
 (0)