4 class RedactionTest < ActiveSupport::TestCase
7 def test_cannot_redact_current
8 n = current_nodes(:node_with_versions)
10 assert_equal(false, n.redacted?, "Expected node to not be redacted already.")
11 assert_raise(OSM::APICannotRedactError) do
16 def test_cannot_redact_current_via_old
17 n = nodes(:node_with_versions_v4)
18 r = create(:redaction)
19 assert_equal(false, n.redacted?, "Expected node to not be redacted already.")
20 assert_raise(OSM::APICannotRedactError) do
25 def test_can_redact_old
26 n = nodes(:node_with_versions_v3)
27 r = create(:redaction)
28 assert_equal(false, n.redacted?, "Expected node to not be redacted already.")
29 assert_nothing_raised(OSM::APICannotRedactError) do
32 assert_equal(true, n.redacted?, "Expected node to be redacted after redact! call.")