diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2019-04-29 23:59:22 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-04-29 23:59:22 -0600 |
| commit | bb47c333df0aaab6daefa1f4acd3ba3d2623c0c8 (patch) | |
| tree | 7399d00732e655f5f89581e3f2763d026f33fefb /test | |
| parent | 2175b806d44ef9ef942c9cc7f63e3c402652a426 (diff) | |
resolves #3282 rename AbstractNode#options to AbstractNode#enabled_options (PR #3285)
Diffstat (limited to 'test')
| -rw-r--r-- | test/api_test.rb | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/test/api_test.rb b/test/api_test.rb index a3ebcee4..1af11bd5 100644 --- a/test/api_test.rb +++ b/test/api_test.rb @@ -1550,6 +1550,18 @@ context 'API' do assert_equal '', block.attributes['reversed-option'] end + test 'enabled_options should return all options which are set' do + input = <<~'EOS' + [%interactive] + * [x] code + * [ ] test + * [ ] profit + EOS + + block = (document_from_string input).blocks[0] + assert_equal %w(checklist interactive).to_set, block.enabled_options + end + test 'should append option to existing options' do input = <<~'EOS' [%fancy] @@ -1586,7 +1598,7 @@ context 'API' do EOS block = (document_from_string input).blocks[0] - assert_equal %w(compact reversed).to_set, block.options + assert_equal %w(compact reversed).to_set, block.enabled_options end test 'table column should not be a block or inline' do |
