Sha256: 2bbf20b66ebb23e90023cc82e7210ab800c52ed17caf2373af92218e90f48957

Contents?: true

Size: 593 Bytes

Versions: 9

Compression:

Stored size: 593 Bytes

Contents

require "spec_helper"

describe PagSeguro::Session do
  let(:session) { PagSeguro::Session.new }
  subject { session }

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

  it { should respond_to(:create) }

  describe "#create" do
    subject { session.create  }

    context 'with default email and token' do
      before do
        stub_request(:post, "https://ws.pagseguro.uol.com.br/v2/sessions").
           with(body: "email=mail&token=token").to_return(status: 200)
      end

      it { should be_a_kind_of(PagSeguro::Session::Response) }
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
pagseguro-transparente-0.1.3 spec/pagseguro/session_spec.rb
pagseguro-transparente-0.1.2 spec/pagseguro/session_spec.rb
pagseguro-transparente-0.1.1 spec/pagseguro/session_spec.rb
pagseguro-transparente-0.1.0 spec/pagseguro/session_spec.rb
pagseguro-transparente-0.0.9 spec/pagseguro/session_spec.rb
pagseguro-transparente-0.0.8 spec/pagseguro/session_spec.rb
pagseguro-transparente-0.0.7 spec/pagseguro/session_spec.rb
pagseguro-transparente-0.0.6 spec/pagseguro/session_spec.rb
pagseguro-transparente-0.0.5 spec/pagseguro/session_spec.rb