'Approving and marking ready a rev should update the doc\'s ref.'

def test_ready_for_l10n_updates_doc(self):

    ready_1 = ApprovedRevisionFactory(is_ready_for_localization=True)
    eq_(ready_1, ready_1.document.latest_localizable_revision)
    unready = RevisionFactory(document=ready_1.document, is_approved=False, is_ready_for_localization=False)
    ready_2 = ApprovedRevisionFactory(document=ready_1.document, is_ready_for_localization=True)
    eq_(ready_2, ready_2.document.latest_localizable_revision)
    unready.is_ready_for_localization = True
    unready.is_approved = True
    unready.save()
    eq_(ready_2, ready_2.document.latest_localizable_revision)
