Sha256: a307c55eb1d2312f28548025b610e53cc5228e70fab20dcb1b3dd9e4012b277e

Contents?: true

Size: 797 Bytes

Versions: 1

Compression:

Stored size: 797 Bytes

Contents

# frozen_string_literal: true

module Crunchbase
  RSpec.describe Client do
    let(:client) { Crunchbase::Client.new }
    let(:facebook_json_data) { parse_json('organizations', 'facebook') }

    context '#get facebook information' do
      let(:facebook_data1) { client.get('facebook', 'Organization') }
      let(:facebook_data2) { Model::Organization.get('facebook') }

      before :each do
        result = Model::Organization.new(facebook_json_data)

        allow(client).to receive(:get).and_return(result)
        allow(Model::Organization).to receive(:get).and_return(result)
      end

      it 'should return `facebook` as permalink' do
        expect(facebook_data2.permalink).to eq('facebook')
        expect(facebook_data1.permalink).to eq('facebook')
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
crunchbase-ruby-library-0.3.1 spec/crunchbase/client_spec.rb