Skip to content

Commit

Permalink
Cover #856 with test
Browse files Browse the repository at this point in the history
Related to #856
  • Loading branch information
kapr200 committed Sep 27, 2024
1 parent c890cde commit 92b7055
Show file tree
Hide file tree
Showing 2 changed files with 1,268 additions and 0 deletions.
21 changes: 21 additions & 0 deletions tests/integration/gitlab/test_comments.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,3 +52,24 @@ def test_get_reactions(self):
issue_comment.add_reaction("-1")
issue_comment.add_reaction("tractor")
assert len(pr_comment.get_reactions()) == 3

def test_duplicit_reactions(self):
pr = self.service.get_project(
repo="hello-world",
namespace="packit-service",
).get_pr(1149)
pr_comment = pr.get_comments()[-1]

pr_reaction_1 = pr_comment.add_reaction("tractor")
pr_reaction_2 = pr_comment.add_reaction("tractor")
assert pr_reaction_1._raw_reaction.id == pr_reaction_2._raw_reaction.id

issue = self.service.get_project(
repo="hello-world",
namespace="packit-service",
).get_issue(12)
issue_comment = issue.get_comments()[-1]

issue_reaction_1 = issue_comment.add_reaction("tractor")
issue_reaction_2 = issue_comment.add_reaction("tractor")
assert issue_reaction_1._raw_reaction.id == issue_reaction_2._raw_reaction.id
Loading

0 comments on commit 92b7055

Please sign in to comment.