summaryrefslogtreecommitdiff
path: root/test/tc_config.rb
diff options
context:
space:
mode:
authorAntonio Terceiro <terceiro@softwarelivre.org>2015-01-13 17:21:18 -0200
committerAntonio Terceiro <terceiro@softwarelivre.org>2015-01-13 17:21:18 -0200
commit7ce801979c3a17622dc74edf67cbb0d001d7ca02 (patch)
treed6db682fb8c0e228bb3ab3bb91fcc29fc4f838e4 /test/tc_config.rb
parente8a209d79f44a6aaaa103ccf647d58881aff91a7 (diff)
downloadfeed2imap-7ce801979c3a17622dc74edf67cbb0d001d7ca02.tar.gz
feed2imap-7ce801979c3a17622dc74edf67cbb0d001d7ca02.tar.bz2
feed2imap-7ce801979c3a17622dc74edf67cbb0d001d7ca02.zip
Handle being given numbers as feed name
Force feed names to be strings because they will be handled as strings later.
Diffstat (limited to 'test/tc_config.rb')
-rwxr-xr-xtest/tc_config.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/tc_config.rb b/test/tc_config.rb
index 255bdb7..8d5353c 100755
--- a/test/tc_config.rb
+++ b/test/tc_config.rb
@@ -54,6 +54,15 @@ feeds:
url: http://something
target: [ *target, "feed1" ]
EOF
+CONFINTNAME = <<EOF
+parts: text
+include-images: false
+prefix: &target "maildir:///tmp/Maildir/"
+feeds:
+ - name: 10
+ url: http://something
+ target: [ *target, "feed1" ]
+EOF
class ConfigTest < Test::Unit::TestCase
def test_cache
@@ -95,4 +104,10 @@ class ConfigTest < Test::Unit::TestCase
assert_equal "/tmp/Maildir/feed1", conf.feeds.first.folder
end
+ def test_integer_as_name
+ sio = StringIO.new CONFINTNAME
+ conf = F2IConfig.new(sio)
+ assert_equal "10", conf.feeds.first.name
+ end
+
end