Show More
@@ -25,6 +25,7 b' from rhodecode.tests import *' | |||
|
25 | 25 | from rhodecode.model.db import ( |
|
26 | 26 | ChangesetComment, Notification, UserNotification) |
|
27 | 27 | from rhodecode.model.meta import Session |
|
28 | from rhodecode.lib import helpers as h | |
|
28 | 29 | |
|
29 | 30 | |
|
30 | 31 | @pytest.mark.backends("git", "hg", "svn") |
@@ -53,7 +54,8 b' class TestChangeSetCommentsController(Te' | |||
|
53 | 54 | |
|
54 | 55 | def test_create(self, backend): |
|
55 | 56 | self.log_user() |
|
56 |
commit |
|
|
57 | commit = backend.repo.get_commit('300') | |
|
58 | commit_id = commit.raw_id | |
|
57 | 59 | text = u'CommentOnCommit' |
|
58 | 60 | |
|
59 | 61 | params = {'text': text, 'csrf_token': self.csrf_token} |
@@ -77,7 +79,8 b' class TestChangeSetCommentsController(Te' | |||
|
77 | 79 | comment_id = ChangesetComment.query().first().comment_id |
|
78 | 80 | assert notification.type_ == Notification.TYPE_CHANGESET_COMMENT |
|
79 | 81 | |
|
80 |
sbj = 'commented on |
|
|
82 | sbj = 'commented on commit `{0}` in the {1} repository'.format( | |
|
83 | h.show_id(commit), backend.repo_name) | |
|
81 | 84 | assert sbj in notification.subject |
|
82 | 85 | |
|
83 | 86 | lnk = (u'/{0}/changeset/{1}#comment-{2}'.format( |
@@ -86,7 +89,8 b' class TestChangeSetCommentsController(Te' | |||
|
86 | 89 | |
|
87 | 90 | def test_create_inline(self, backend): |
|
88 | 91 | self.log_user() |
|
89 |
commit |
|
|
92 | commit = backend.repo.get_commit('300') | |
|
93 | commit_id = commit.raw_id | |
|
90 | 94 | text = u'CommentOnCommit' |
|
91 | 95 | f_path = 'vcs/web/simplevcs/views/repository.py' |
|
92 | 96 | line = 'n1' |
@@ -119,8 +123,10 b' class TestChangeSetCommentsController(Te' | |||
|
119 | 123 | assert notification.type_ == Notification.TYPE_CHANGESET_COMMENT |
|
120 | 124 | |
|
121 | 125 | assert comment.revision == commit_id |
|
122 | ||
|
123 | sbj = ' commented on a commit of {0}'.format(backend.repo_name) | |
|
126 | sbj = 'commented on commit `{commit}` ' \ | |
|
127 | '(file: `{f_path}`) in the {repo} repository'.format( | |
|
128 | commit=h.show_id(commit), | |
|
129 | f_path=f_path, line=line, repo=backend.repo_name) | |
|
124 | 130 | assert sbj in notification.subject |
|
125 | 131 | |
|
126 | 132 | lnk = (u'/{0}/changeset/{1}#comment-{2}'.format( |
General Comments 0
You need to be logged in to leave comments.
Login now