diff options
author | Antonio Terceiro <terceiro@softwarelivre.org> | 2014-02-05 17:27:51 -0300 |
---|---|---|
committer | Antonio Terceiro <terceiro@softwarelivre.org> | 2014-02-05 17:27:51 -0300 |
commit | 35b6a29db96bbf835c1973f3349856149ecac76f (patch) | |
tree | 4182aa39b4126d6bfb6292bbed2831b3664d8fc5 /test/tc_config.rb | |
parent | 6b9107e9f81202ec45446c8f2239e056a5c3e503 (diff) | |
download | feed2imap-35b6a29db96bbf835c1973f3349856149ecac76f.tar.gz feed2imap-35b6a29db96bbf835c1973f3349856149ecac76f.tar.bz2 feed2imap-35b6a29db96bbf835c1973f3349856149ecac76f.zip |
config: fix regression with arrays as target
Diffstat (limited to 'test/tc_config.rb')
-rwxr-xr-x | test/tc_config.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/tc_config.rb b/test/tc_config.rb index ad4877c..255bdb7 100755 --- a/test/tc_config.rb +++ b/test/tc_config.rb @@ -45,6 +45,15 @@ feeds: url: http://something2 target: imap://login:pasword@ezaezae/Feeds/B EOF +CONFARRAYTARGET = <<EOF +parts: text +include-images: false +prefix: &target "maildir:///tmp/Maildir/" +feeds: + - name: feed1 + url: http://something + target: [ *target, "feed1" ] +EOF class ConfigTest < Test::Unit::TestCase def test_cache @@ -79,4 +88,11 @@ class ConfigTest < Test::Unit::TestCase assert conf.parts.include?('text') assert ! conf.parts.include?('html') end + + def test_url_array + sio = StringIO::new CONFARRAYTARGET + conf = F2IConfig::new(sio) + assert_equal "/tmp/Maildir/feed1", conf.feeds.first.folder + end + end |