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