Sha256: 6840c5a53a0e451f14488d38aa9f814983b936b5e890fd0bcf930079b1a55627

Contents?: true

Size: 735 Bytes

Versions: 7

Compression:

Stored size: 735 Bytes

Contents

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

class AccountTest < Test::Unit::TestCase #:nodoc: all
  context "An account" do
    setup do
      @connection = Twilio::Connection.new('mysid', 'mytoken')
      @account = Twilio::Account.new(@connection)
    end

    should "be retrievable" do
      fake_response = fixture(:account)
      FakeWeb.register_uri(:get, twilio_url, :string => fake_response)
      assert_equal @account.get, fake_response
    end
    
    should "be able to update name" do
      fake_response = fixture(:account_renamed)
      FakeWeb.register_uri(:put, twilio_url, :string => fake_response)
      response = @account.update_name('Bubba')
      assert_equal response, fake_response
    end 
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
webficient-twilio-1.2.0 test/twilio/account_test.rb
webficient-twilio-1.3.0 test/twilio/account_test.rb
webficient-twilio-1.4.0 test/twilio/account_test.rb
webficient-twilio-2.0.0 test/twilio/account_test.rb
webficient-twilio-2.1.0 test/twilio/account_test.rb
webficient-twilio-2.2.0 test/twilio/account_test.rb
twilio-1.4.0 test/twilio/account_test.rb