summaryrefslogtreecommitdiff
path: root/test/tc_config.rb
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2011-01-10 05:24:04 -0800
committerLucas Nussbaum <lucas@lucas-nussbaum.net>2011-02-18 17:13:25 +0100
commit7579f7326ae3b8c8f441ef8b42be915cb400dc6d (patch)
treec13834a437f1be2435bb4e50cd2fc9b061ad8804 /test/tc_config.rb
parente36e42b740d9fd8b31e0d6129812501f4b787a34 (diff)
downloadfeed2imap-7579f7326ae3b8c8f441ef8b42be915cb400dc6d.tar.gz
feed2imap-7579f7326ae3b8c8f441ef8b42be915cb400dc6d.tar.bz2
feed2imap-7579f7326ae3b8c8f441ef8b42be915cb400dc6d.zip
add "parts" config option
This allows disabling either HTML or text parts to save bandwidth/disk space on the IMAP server.
Diffstat (limited to '')
-rwxr-xr-xtest/tc_config.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/tc_config.rb b/test/tc_config.rb
index ce910e9..ad4877c 100755
--- a/test/tc_config.rb
+++ b/test/tc_config.rb
@@ -34,6 +34,17 @@ feeds:
url: http://something2
target: imaps://login:pasword@ezaezae/Feeds/B
EOF
+CONFPARTS = <<EOF
+parts: text
+include-images: false
+feeds:
+ - name: feed1
+ url: http://something
+ target: imap://login:pasword@ezaezae/Feeds/A
+ - name: feed2
+ url: http://something2
+ target: imap://login:pasword@ezaezae/Feeds/B
+EOF
class ConfigTest < Test::Unit::TestCase
def test_cache
@@ -61,4 +72,11 @@ class ConfigTest < Test::Unit::TestCase
assert_equal('http://something', conf.feeds[0].url)
assert_equal('http://something2', conf.feeds[1].url)
end
+
+ def test_parts
+ sio = StringIO::new CONFPARTS
+ conf = F2IConfig::new(sio)
+ assert conf.parts.include?('text')
+ assert ! conf.parts.include?('html')
+ end
end