Repository URL to install this package:
|
Version:
0.0.1 ▾
|
require 'spec_helper'
RSpec.describe Gingr::Client::Reservations do
before do
@client = Gingr::Client.new({company_app_name: 'company'})
end
describe '#reservations' do
before do
stub_request(:post, "https://company.gingrapp.com/api/v1/reservations").
with(:body => "key",
:headers => {'Accept'=>'*/*', 'Accept-Encoding'=>'gzip;q=1.0,deflate;q=0.6,identity;q=0.3', 'Company-App-Name'=>'company', 'Key'=>'', 'User-Agent'=>'Faraday v0.9.2'}).
to_return(:status => 200, :body => "", :headers => {})
end
it 'should return a list of orders' do
@client.reservations
expect(a_post('company.gingrapp.com/api/v1/reservations')).to have_been_made
end
end
end