Sha256: 68b12ddea186352dfe4dd1e5a342510f53ef1472566c6fed2ce9ad986f7d343d

Contents?: true

Size: 755 Bytes

Versions: 2

Compression:

Stored size: 755 Bytes

Contents

describe Moip2::WebhooksApi do
	let(:webhooks_api) { described_class.new sandbox_oauth_client }
	
	describe "#show" do
		
		let(:get_webhooks) do
			VCR.use_cassette("get_webhooks") do
				webhooks_api.show
			end
		end
		
		context 'when shooting request by webhooks' do
			it { expect(get_webhooks.webhooks[0][:id]).not_to be_nil }
			it { expect(get_webhooks.webhooks[0][:resource_id]).to eq "ORD-2M8Q09MMCCE2" }
			it { expect(get_webhooks.webhooks[0][:event]).to eq "ORDER.PAID" }
			it { expect(get_webhooks.webhooks[0][:url])	.to eq "http://www.100escolha.com/moip_suporte/" }
			it { expect(get_webhooks.webhooks[0][:status]).to eq "CREATED" }
			it { expect(get_webhooks.webhooks[0][:sent_at]).to eq "May 13, 2015 7:09:06 PM" }
		end
		
	end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
moip2-0.1.4 spec/moip2/webhooks_spec.rb
moip2-0.1.3 spec/moip2/webhooks_spec.rb