diff options
author | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-16 00:26:03 +0200 |
---|---|---|
committer | René 'Necoro' Neumann <necoro@necoro.eu> | 2020-04-16 00:26:03 +0200 |
commit | 89c7df164b73748cd5c129ec9599cadfbb938eb6 (patch) | |
tree | 3b4ffa2616a000b6152ce4b0af2e8b980f1f97fc /test/tc_config.rb | |
parent | f892d2340b2d7f5386fc7cf78495fdb05ad59a04 (diff) | |
download | feed2imap-89c7df164b73748cd5c129ec9599cadfbb938eb6.tar.gz feed2imap-89c7df164b73748cd5c129ec9599cadfbb938eb6.tar.bz2 feed2imap-89c7df164b73748cd5c129ec9599cadfbb938eb6.zip |
No more (obsolete) tests
Diffstat (limited to '')
-rwxr-xr-x | test/tc_config.rb | 113 |
1 files changed, 0 insertions, 113 deletions
diff --git a/test/tc_config.rb b/test/tc_config.rb deleted file mode 100755 index 8d5353c..0000000 --- a/test/tc_config.rb +++ /dev/null @@ -1,113 +0,0 @@ -#!/usr/bin/ruby -w - -$:.unshift File.join(File.dirname(__FILE__), '..', 'lib') - -require 'test/unit' -require 'feed2imap/config' -require 'stringio' - -CONF1 = <<EOF -cache: /home/lucas/.feed2imap_cachedatabase -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 -CONF2 = <<EOF -feeds: - - name: feed1 - url: http://something - target: imap://login:pasword@ezaezae/Feeds/A - - name: feed2 - url: http://something2 - target: imaps://login:pasword@ezaezae/Feeds/B -EOF -CONFFEED = <<EOF -feeds: - - name: feed1 - url: feed:http://something - target: imap://login:pasword@ezaezae/Feeds/A - - name: feed2 - 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 -CONFARRAYTARGET = <<EOF -parts: text -include-images: false -prefix: &target "maildir:///tmp/Maildir/" -feeds: - - name: feed1 - 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 - sio = StringIO::new CONF1 - conf = F2IConfig::new(sio) - assert_equal('/home/lucas/.feed2imap_cachedatabase', conf.cache) - # testing default value - sio = StringIO::new CONF2 - conf = F2IConfig::new(sio) - assert_equal(ENV['HOME'] + '/.feed2imap.cache', conf.cache) - end - - def test_accounts - sio = StringIO::new CONF1 - conf = F2IConfig::new(sio) - assert_equal(1, conf.imap_accounts.length) - sio = StringIO::new CONF2 - conf = F2IConfig::new(sio) - assert_equal(2, conf.imap_accounts.length) - end - - def test_feedurls - sio = StringIO::new CONFFEED - conf = F2IConfig::new(sio) - 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 - - def test_url_array - sio = StringIO::new CONFARRAYTARGET - conf = F2IConfig::new(sio) - 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 |