Sha256: 39061097eac98c686ee92fb5efb9dc05c12a9f434a308344b0f07f323cbb3f96

Contents?: true

Size: 722 Bytes

Versions: 1

Compression:

Stored size: 722 Bytes

Contents

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

class AccountTest < Test::Unit::TestCase
  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

1 entries across 1 versions & 1 rubygems

Version Path
webficient-twilio-1.0.0 test/twilio/account_test.rb