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

Commit 5ec3659

Browse files
committed
FIx failing tests.
1 parent a07d4eb commit 5ec3659

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/GitHub.InlineReviews/ViewModels/InlineCommentPeekViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ async Task UpdateThread()
192192

193193
if (!string.IsNullOrWhiteSpace(placeholderBody))
194194
{
195-
var placeholder = Thread.Comments.LastOrDefault();
195+
var placeholder = vm.Comments.LastOrDefault();
196196

197197
if (placeholder?.EditState == CommentEditState.Placeholder)
198198
{

test/GitHub.InlineReviews.UnitTests/ViewModels/InlineCommentPeekViewModelTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ IPeekSession CreatePeekSession()
370370
IPullRequestSession CreateSession()
371371
{
372372
var result = Substitute.For<IPullRequestSession>();
373+
result.PullRequest.Returns(new PullRequestDetailModel());
373374
result.User.Returns(new ActorModel { Login = "CurrentUser" });
374375
result.LocalRepository.CloneUrl.Returns(new UriString("https://foo.bar"));
375376
return result;

0 commit comments

Comments
 (0)