From 8cf6dd2ff2f44de2a2ded1e20f23d579e514dd23 Mon Sep 17 00:00:00 2001 From: Ridwan Hoq Date: Tue, 25 Feb 2020 20:29:43 -0600 Subject: [PATCH] Add Rocket and Eyes emoji reactions (#2114) Co-authored-by: Brendan Forster --- .../Clients/CommitCommentReactionsClientTests.cs | 13 +++++++++---- Octokit/Models/Response/Reaction.cs | 8 +++++++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Octokit.Tests.Integration/Clients/CommitCommentReactionsClientTests.cs b/Octokit.Tests.Integration/Clients/CommitCommentReactionsClientTests.cs index ebf204ca..7e18eb69 100644 --- a/Octokit.Tests.Integration/Clients/CommitCommentReactionsClientTests.cs +++ b/Octokit.Tests.Integration/Clients/CommitCommentReactionsClientTests.cs @@ -58,16 +58,21 @@ public class CommitCommentReactionsClientTests Assert.NotNull(result); - var newReaction = new NewReaction(ReactionType.Confused); - var reaction = await _github.Reaction.CommitComment.Create(_context.RepositoryOwner, _context.RepositoryName, result.Id, newReaction); + var confusedReaction = new NewReaction(ReactionType.Confused); + var firstReaction = await _github.Reaction.CommitComment.Create(_context.RepositoryOwner, _context.RepositoryName, result.Id, confusedReaction); + + var rocketReaction = new NewReaction(ReactionType.Rocket); + var secondReaction = await _github.Reaction.CommitComment.Create(_context.RepositoryOwner, _context.RepositoryName, result.Id, rocketReaction); var reactions = await _github.Reaction.CommitComment.GetAll(_context.RepositoryOwner, _context.RepositoryName, result.Id); Assert.NotEmpty(reactions); - Assert.Equal(reaction.Id, reactions[0].Id); + Assert.Equal(firstReaction.Id, reactions[0].Id); + Assert.Equal(firstReaction.Content, reactions[0].Content); - Assert.Equal(reaction.Content, reactions[0].Content); + Assert.Equal(secondReaction.Id, reactions[1].Id); + Assert.Equal(secondReaction.Content, reactions[1].Content); } [IntegrationTest] diff --git a/Octokit/Models/Response/Reaction.cs b/Octokit/Models/Response/Reaction.cs index e842d916..41a171a3 100644 --- a/Octokit/Models/Response/Reaction.cs +++ b/Octokit/Models/Response/Reaction.cs @@ -22,7 +22,13 @@ namespace Octokit Heart, [Parameter(Value = "hooray")] - Hooray + Hooray, + + [Parameter(Value = "rocket")] + Rocket, + + [Parameter(Value = "eyes")] + Eyes } [DebuggerDisplay("{DebuggerDisplay,nq}")]