X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mailshears.git;a=blobdiff_plain;f=test%2Fmailshears_test.rb;h=e46ca11ff4d144c8324030ec170efffe5d87ae17;hp=8e80c063f0a3a07092996d2eab49f82d50db5d8d;hb=a2d3dd9ee4838fb99557718b4bcdc11c8d1372fd;hpb=a731b98f97194b8882c42d3c2b27de75f60d6b05 diff --git a/test/mailshears_test.rb b/test/mailshears_test.rb index 8e80c06..e46ca11 100644 --- a/test/mailshears_test.rb +++ b/test/mailshears_test.rb @@ -32,8 +32,8 @@ class MailshearsTest < MiniTest::Unit::TestCase db_user = 'postgres' db_pass = nil - connection = PGconn.connect(db_host, db_port, db_opts, db_tty, - db_name, db_user, db_pass) + connection = PG::Connection.new(db_host, db_port, db_opts, db_tty, + db_name, db_user, db_pass) return connection end @@ -138,21 +138,24 @@ class MailshearsTest < MiniTest::Unit::TestCase # +-------------------+-------------+------------+ # # - # +------------------------------------------------------+ - # | alias | - # +-------------------+-------------------+--------------+ - # | address | goto | domain | - # +-------------------+-------------------+--------------+ - # | alice@example.com | alice@example.com | example.com | - # +-------------------+-------------------+--------------+ - # | bob@example.com | bob@example.com | example.com | - # +-------------------+-------------------+--------------+ - # | adam@example.net | adam@example.net | example.net | - # +-------------------+-------------------+--------------+ - # | beth@example.net | beth@example.net | example.net | - # +-------------------+-------------------+--------------+ - # | carol@example.net | carol@example.net | example.net | - # +-------------------+-------------------+--------------+ + # +-------------------------------------------------------+ + # | alias | + # +-------------------+--------------------+--------------+ + # | address | goto | domain | + # +-------------------+--------------------+--------------+ + # | alice@example.com | alice@example.com, | example.com | + # | | adam@example.net, | | + # | | bob@example.com, | | + # | | carol@example.net | | + # +-------------------+--------------------+--------------+ + # | bob@example.com | bob@example.com | example.com | + # +-------------------+--------------------+--------------+ + # | adam@example.net | adam@example.net | example.net | + # +-------------------+--------------------+--------------+ + # | beth@example.net | beth@example.net | example.net | + # +-------------------+--------------------+--------------+ + # | carol@example.net | carol@example.net | example.net | + # +-------------------+--------------------+--------------+ # # # +---------------------------------+ @@ -206,9 +209,10 @@ class MailshearsTest < MiniTest::Unit::TestCase plugin_dbuser = cfg.send("#{plugin}_dbuser") plugin_dbpass = cfg.send("#{plugin}_dbpass") - plugin_conn = PGconn.connect(plugin_dbhost, plugin_dbport, plugin_dbopts, - plugin_dbtty, plugin_dbname, plugin_dbuser, - plugin_dbpass) + plugin_conn = PG::Connection.new(plugin_dbhost, plugin_dbport, + plugin_dbopts, plugin_dbtty, + plugin_dbname, plugin_dbuser, + plugin_dbpass) sql = File.open("test/sql/#{plugin}.sql").read() plugin_conn.query(sql)