+ assert_nil old_relation.reload.redaction
+ end
+
+ ##
+ # test the redaction of an old version of a relation, while not being
+ # authorised.
+ def test_redact_relation_unauthorised
+ relation = create(:relation, :with_history, :version => 2)
+ old_relation = relation.old_relations.find_by(:version => 1)
+ redaction = create(:redaction)
+
+ post relation_version_redact_path(*old_relation.id), :params => { :redaction => redaction.id }
+
+ assert_response :unauthorized, "should need to be authenticated to redact."
+ assert_nil old_relation.reload.redaction