Skip to content
This repository has been archived by the owner on Mar 15, 2018. It is now read-only.

Commit

Permalink
Add time to date for flagged reviews (bug 504003)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkoberger committed May 24, 2011
1 parent 774c36c commit 67b524d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/editors/templates/editors/queue.html
Expand Up @@ -108,7 +108,7 @@ <h3>
{% for reason in review.instance.reviewflag_set.all() %}
<li>
<div>
{% trans user=reason.user|user_link, date=reason.modified|datetime,
{% trans user=reason.user|user_link, date=reason.modified|babel_datetime,
reason=flags[reason.flag] %}
<strong>{{ reason }}</strong>
<span class="light">Flagged by {{ user }} on {{ date }}</span>
Expand Down
9 changes: 7 additions & 2 deletions apps/editors/tests/test_views.py
Expand Up @@ -761,8 +761,13 @@ def test_results(self):
assert doc('#id_form-0-action_1:checked')

current_date = jingo.helpers.datetime(datetime.now())
eq_(doc('.reviews-flagged-reasons span.light').text(),
'Flagged by editor on %s' % current_date)
text = doc('.reviews-flagged-reasons span.light').text()
assert 'Flagged by editor on %s' % current_date in text, (
('Unexpected text: %s' % text))

# Check that a time is included in the text
assert re.search("[0-9]+:[0-9]{2}:[0-9]{2} (AM|PM)", text), (
('Unexpected text: %s' % text))

def setup_actions(self, action):
ctx = self.client.get(self.url).context
Expand Down

0 comments on commit 67b524d

Please sign in to comment.