Sha256: cb60314cdc3ddfc56375196d6b59e8feeb3ae2b826248374ab2eee59f572189c

Contents?: true

Size: 647 Bytes

Versions: 3

Compression:

Stored size: 647 Bytes

Contents

require "spec_helper"

describe PagSeguro::Query do
  let(:code) { '64C4CB1E-5FF2-4092-BE17-CACE271D789E' }

  let(:query) { PagSeguro::Query.new(code) }
  subject { query  }

  it { should respond_to(:transaction) }

  before do
    PagSeguro.email = 'mail'
    PagSeguro.token = 'token'
  end

  describe "#transaction" do
    subject { query.transaction  }
    before do
      stub_request(:get, "https://ws.pagseguro.uol.com.br/v2/transactions/64C4CB1E-5FF2-4092-BE17-CACE271D789E?email=mail&token=token").
       to_return(:status => 200, :body => "", :headers => {})
    end

    it { should be_a_kind_of(PagSeguro::Transaction) }
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pagseguro-transparente-0.1.3 spec/pagseguro/query_spec.rb
pagseguro-transparente-0.1.2 spec/pagseguro/query_spec.rb
pagseguro-transparente-0.1.1 spec/pagseguro/query_spec.rb