Sha256: 1186ae9ace3fe6ce54aeb24b2b5ab4692c277b095e5636b1e62cab6b371ebde4

Contents?: true

Size: 1.26 KB

Versions: 1

Compression:

Stored size: 1.26 KB

Contents

require 'test/unit'

require 'valdemaximus-conduit'

class TestValdeMaximusConduit < Test::Unit::TestCase
  def test_message_with_phone_numbers
    c = ValdeMaximus::Conduit.new(:format => 'plain', :domain => 'localhost', :port => 3000, :creds => 'rQMX3kaae9CBtdNWp7U9')
    res = c.send_message('hello world 2',
                         ['8016946632'])
    assert_equal('SUCCESS', res[1])
  end
  
  def test_create_phone_numbers
    c = ValdeMaximus::Conduit.new(:format => 'plain', :domain => 'localhost', :port => 3000, :creds => 'rQMX3kaae9CBtdNWp7U9')
    res = c.add_phone_numbers(['8016946632', '8016025388'])
    assert_equal('SUCCESS', res[1])
  end
  
  # def test_message_with_node_id
  #   c = ValdeMaximus::Conduit.new(:domain => 'smsportal.heroku.com', :port => 80, :creds => '_q74odt6MdFbtVU_cdNy')
  #   res = c.send_message('hello world',
  #                        ['8016946634',
  #                         '8016946632, Dwight',
  #                         '8016946633, Merideth'], 1)
  #   assert_equal('SUCCESS', res[1])
  #   
  #   res = c.send_message('hello world',
  #                        ['8016946634',
  #                         '8016946632, Toby',
  #                         '8016946633, Michael'], 1000000)
  #   assert_equal('FAILURE', res[1])
  # end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
valdemaximus-conduit-1.0.0 test/tc_conduit.rb