Repository URL to install this package:
|
Version:
0.0.1 ▾
|
require 'spec_helper'
RSpec.describe Gingr::Client::Owners do
before do
@client = Gingr::Client.new({company_app_name: "company"})
end
describe '#owners' do
before do
stub_request(:post, "https://company.gingrapp.com/api/v1/new_modified_owners").
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 customers' do
@client.owners
expect(a_post('company.gingrapp.com/api/v1/new_modified_owners').
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 have_been_made
end
end
end