|
@@ -138,8 +138,9 @@ class GroupSerializerSnubaTest(APITestCase, SnubaTestCase):
|
|
|
assert result["status"] == "resolved"
|
|
|
assert result["statusDetails"]["inCommit"]["id"] == commit.key
|
|
|
|
|
|
+ @patch("sentry.analytics.record")
|
|
|
@patch("sentry.models.Group.is_over_resolve_age")
|
|
|
- def test_auto_resolved(self, mock_is_over_resolve_age):
|
|
|
+ def test_auto_resolved(self, mock_is_over_resolve_age, mock_record):
|
|
|
mock_is_over_resolve_age.return_value = True
|
|
|
|
|
|
user = self.create_user()
|
|
@@ -148,6 +149,14 @@ class GroupSerializerSnubaTest(APITestCase, SnubaTestCase):
|
|
|
result = serialize(group, user, serializer=GroupSerializerSnuba())
|
|
|
assert result["status"] == "resolved"
|
|
|
assert result["statusDetails"] == {"autoResolved": True}
|
|
|
+ mock_record.assert_called_with(
|
|
|
+ "issue.resolved",
|
|
|
+ default_user_id=self.project.organization.get_default_owner().id,
|
|
|
+ project_id=self.project.id,
|
|
|
+ organization_id=self.project.organization_id,
|
|
|
+ group_id=group.id,
|
|
|
+ resolution_type="automatic",
|
|
|
+ )
|
|
|
|
|
|
def test_subscribed(self):
|
|
|
user = self.create_user()
|