comment-issue -> add-comment

This commit is contained in:
Élie Bouttier 2014-09-04 19:28:31 -07:00
parent 56d1e60564
commit 8355936767
3 changed files with 4 additions and 4 deletions

View file

@ -74,7 +74,7 @@
</div>
<div class="panel-body">
{% if perm.create_comment %}
<form action="{% url 'comment-issue' project.name issue.id %}" method="post" role="form">
<form action="{% url 'add-comment' project.name issue.id %}" method="post" role="form">
{% csrf_token %}
<div class="form-group">
{{ form.comment }}

View file

@ -222,9 +222,9 @@ class TestViews(TestCase):
project = Project.objects.get(name='project-1')
issue = project.issues.get(title='Issue 1')
count = issue.comments.count()
response = self.client.get(reverse('comment-issue', args=[project.name, issue.id]))
response = self.client.get(reverse('add-comment', args=[project.name, issue.id]))
self.assertEqual(response.status_code, 200)
response = self.client.post(reverse('comment-issue', args=[project.name, issue.id]), {
response = self.client.post(reverse('add-comment', args=[project.name, issue.id]), {
'comment': 'New comment.',
})
self.assertRedirects(response, reverse('show-issue', args=[project.name, issue.id]))

View file

@ -21,7 +21,7 @@ urlpatterns = [
url(r'^(?P<project>[-\w]+)/issues/(?P<issue>[0-9]+)/delete/$', 'tracker.views.issue_delete', name='delete-issue'),
url(r'^(?P<project>[-\w]+)/issues/(?P<issue>[0-9]+)/close/$', 'tracker.views.issue_close', name='close-issue'),
url(r'^(?P<project>[-\w]+)/issues/(?P<issue>[0-9]+)/reopen/$', 'tracker.views.issue_reopen', name='reopen-issue'),
url(r'^(?P<project>[-\w]+)/issues/(?P<issue>[0-9]+)/comment/$', 'tracker.views.issue_comment_edit', name='comment-issue'),
url(r'^(?P<project>[-\w]+)/issues/(?P<issue>[0-9]+)/comment/$', 'tracker.views.issue_comment_edit', name='add-comment'),
url(r'^(?P<project>[-\w]+)/issues/(?P<issue>[0-9]+)/comments/(?P<comment>[0-9]+)/edit/$', 'tracker.views.issue_comment_edit', name='edit-comment'),
url(r'^(?P<project>[-\w]+)/issues/(?P<issue>[0-9]+)/comments/(?P<comment>[0-9]+)/delete/$', 'tracker.views.issue_comment_delete', name='delete-comment'),
url(r'^(?P<project>[-\w]+)/issues/(?P<issue>[0-9]+)/subscribe/$', 'tracker.views.issue_subscribe', name='subscribe-issue'),