Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
gingr / spec / gingr / clients / customers_spec.rb
Size: Mime:
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