Sha256: 570a9566bf2f4f950d0c56758898b0388db9b7cb47517c8880657936e5548762

Contents?: true

Size: 668 Bytes

Versions: 5

Compression:

Stored size: 668 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class ConnectionTest < Test::Unit::TestCase #:nodoc: all
  context "A Twilio connection" do
    setup do
      @connection = Twilio::Connection.new('mysid', 'mytoken')
    end
    
    context "when initializing" do
      should "have correct url" do
        assert_equal "#{Twilio::Connection::TWILIO_URL}/mysid", @connection.class.base_uri
      end
    end
    
    context "when invoked as class method" do
      setup do
        Twilio.connect('mysid', 'mytoken')
      end
      
      should "have correct url" do
        assert_equal "#{Twilio::TWILIO_URL}/mysid", Twilio.base_uri
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
twilio-2.8.0 test/twilio/connection_test.rb
twilio-2.7.0 test/twilio/connection_test.rb
twilio-2.6.0 test/twilio/connection_test.rb
twilio-2.5.0 test/twilio/connection_test.rb
twilio-2.4.1 test/twilio/connection_test.rb