'Verify revision rejection.'

@mock.patch.object(send_reviewed_notification, 'delay')
@mock.patch.object(Site.objects, 'get_current')
def test_reject_revision(self, get_current, delay):

    get_current.return_value.domain = 'testserver'
    comment = 'no    good'
    response = post(self.client, 'wiki.review_revision', {'reject': 'Reject    Revision', 'comment': comment}, args=[self.document.slug, self.revision.id])
    eq_(200, response.status_code)
    r = Revision.objects.get(pk=self.revision.pk)
    assert r.reviewed
    assert (not r.is_approved)
    delay.assert_called_with(r, r.document, comment)
    assert (r.creator not in r.document.contributors.all())
