diff --git a/kallithea/tests/functional/test_changeset_pullrequests_comments.py b/kallithea/tests/functional/test_changeset_pullrequests_comments.py --- a/kallithea/tests/functional/test_changeset_pullrequests_comments.py +++ b/kallithea/tests/functional/test_changeset_pullrequests_comments.py @@ -1,6 +1,7 @@ import re from kallithea.tests.base import * +from kallithea.model.changeset_status import ChangesetStatusModel from kallithea.model.db import ChangesetComment, Notification, \ UserNotification from kallithea.model.meta import Session @@ -118,6 +119,45 @@ class TestChangeSetCommentsController(Te # test_regular gets notification by @mention assert sorted(users) == [TEST_USER_ADMIN_LOGIN, TEST_USER_REGULAR_LOGIN] + def test_create_status_change(self): + self.log_user() + rev = '27cd5cce30c96924232dffcd24178a07ffeb5dfc' + text = u'general comment on changeset' + + params = {'text': text, 'changeset_status': 'rejected', + '_authentication_token': self.authentication_token()} + response = self.app.post(url(controller='changeset', action='comment', + repo_name=HG_REPO, revision=rev), + params=params, extra_environ={'HTTP_X_PARTIAL_XHR': '1'}) + # Test response... + assert response.status == '200 OK' + + response = self.app.get(url(controller='changeset', action='index', + repo_name=HG_REPO, revision=rev)) + response.mustcontain( + '''