X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/2ba40f97b78f529984ff26c7c7d61c91d213e7b0..fd484b33a3920e0031007c5c2f1dec61913cbab5:/test/unit/voter_notify_test.rb?ds=sidebyside diff --git a/test/unit/voter_notify_test.rb b/test/unit/voter_notify_test.rb new file mode 100644 index 0000000..6e5f802 --- /dev/null +++ b/test/unit/voter_notify_test.rb @@ -0,0 +1,27 @@ +require File.dirname(__FILE__) + '/../test_helper' +require 'voter_notify' + +class VoterNotifyTest < Test::Unit::TestCase + FIXTURES_PATH = File.dirname(__FILE__) + '/../fixtures' + CHARSET = "utf-8" + + include ActionMailer::Quoting + + def setup + ActionMailer::Base.delivery_method = :test + ActionMailer::Base.perform_deliveries = true + ActionMailer::Base.deliveries = [] + + @expected = TMail::Mail.new + @expected.set_content_type "text", "plain", { "charset" => CHARSET } + end + + private + def read_fixture(action) + IO.readlines("#{FIXTURES_PATH}/voter_notify/#{action}") + end + + def encode(subject) + quoted_printable(subject, CHARSET) + end +end