summaryrefslogtreecommitdiff
path: root/test/attributes_test.rb
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-04-14 23:58:55 -0600
committerGitHub <noreply@github.com>2021-04-14 23:58:55 -0600
commit01aa1b564c202695d40d3d910aa6bd5dd0eeac5f (patch)
treed9c5d4293719223389f3d1a944358452574eb3a7 /test/attributes_test.rb
parent53b553cd3dde8ca2279fa19e3f3872b060545698 (diff)
resolves #4013 increment counter (but not the corresponding attribute) if attribute is locked (PR #4015)
Diffstat (limited to 'test/attributes_test.rb')
-rw-r--r--test/attributes_test.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/attributes_test.rb b/test/attributes_test.rb
index 740e94bc..69e33703 100644
--- a/test/attributes_test.rb
+++ b/test/attributes_test.rb
@@ -1227,16 +1227,16 @@ context 'Attributes' do
test 'should not allow counter to modify locked attribute' do
input = <<~'EOS'
- {counter:foo:baz} is still {foo}
+ {counter:foo:ignored} is not {foo}
EOS
output = convert_string_to_embedded input, :attributes => { 'foo' => 'bar' }
- assert_xpath '//p[text()="bar is still bar"]', output, 1
+ assert_xpath '//p[text()="bas is not bar"]', output, 1
end
test 'should not allow counter2 to modify locked attribute' do
input = <<~'EOS'
- {counter2:foo:baz}{foo}
+ {counter2:foo:ignored}{foo}
EOS
output = convert_string_to_embedded input, :attributes => { 'foo' => 'bar' }
@@ -1245,12 +1245,12 @@ context 'Attributes' do
test 'should not allow counter to modify built-in locked attribute' do
input = <<~'EOS'
- {counter:max-include-depth:128} is still {max-include-depth}
+ {counter:max-include-depth:128} is one more than {max-include-depth}
EOS
doc = document_from_string input, standalone: false
output = doc.convert
- assert_xpath '//p[text()="64 is still 64"]', output, 1
+ assert_xpath '//p[text()="65 is one more than 64"]', output, 1
assert_equal 64, doc.attributes['max-include-depth']
end