diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-17 11:08:07 +0100 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2011-08-17 11:08:07 +0100 |
commit | 8c8e5ae926e0009743fe92dccb588783640a6022 (patch) | |
tree | e23eea583beac0caf5fb3e45a33b4d2ac7796abf /test/tc_mauve_configuration_builder.rb | |
parent | 79dcf16ec6d229d6c31e055ed8e6a98327526a3a (diff) |
* Reminder notifications now take the same path to notify as initial alerts
* Threading tidied -- processor will not do anything unless the timer has frozen
* Person#send_alert now tidied and merged with alert_changed
* POP3 server only shows alerts relevant to the user
* Server now defaults to using an in-memory SQLite database (good for testing)
* Server initializes a blank mauve config.
* Tests tidied up
Diffstat (limited to 'test/tc_mauve_configuration_builder.rb')
-rw-r--r-- | test/tc_mauve_configuration_builder.rb | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/test/tc_mauve_configuration_builder.rb b/test/tc_mauve_configuration_builder.rb index 03b86ca..faa0bfa 100644 --- a/test/tc_mauve_configuration_builder.rb +++ b/test/tc_mauve_configuration_builder.rb @@ -1,13 +1,16 @@ $:.unshift "../lib/" -require 'test/unit' -require 'pp' +require 'th_mauve' require 'mauve/configuration_builder' -class TcMauveConfigurationBuildersPeopleAndSourceLists < Test::Unit::TestCase +class TcMauveConfigurationBuildersPeopleAndSourceLists < Mauve::UnitTest def setup - Log4r::Logger.new("Mauve").outputters = Log4r::Outputter.stdout + setup_logger + end + + def teardown + teardown_logger end def test_people_list @@ -48,7 +51,16 @@ people_list "htc-highroad", EOF x = nil + # + # This should generate two warnings: + # * duplicate list + # * Lars already being on a list + # assert_nothing_raised { x = Mauve::ConfigurationBuilder.parse(config) } + + assert_match(/Lars/, logger_pop()) + assert_match(/Duplicate/, logger_pop()) + assert_equal(1, x.people_lists.keys.length) assert_equal(["mark c","mark r","Lars","Bernie","Danny"].sort, x.people_lists["htc-highroad"].list.sort) end |