Sha256: f911fe55afebf51b484e039f8dbb24af41f6601fc78aaf9eb9a85705a7afee82
Contents?: true
Size: 727 Bytes
Versions: 1
Compression:
Stored size: 727 Bytes
Contents
require 'spec_helper' describe AngellistApi::Client::Search do use_vcr_cassette 'search' let(:client) { AngellistApi::Client.new } let(:valid_types) { %w[User Startup MarketTag LocationTag].freeze } it 'searches with a general query' do results = client.search('machine learning') results.should be_an Array end it 'wraps API item types' do results = client.search('machine learning') results.each do |result| valid_types.should include result.type end end it 'searches with a scoped query' do results = client.search('joshua', :type => 'User') results.each { |res| res.type.should eq 'User' } results.map { |res| res.name }.should include 'Joshua Slayton' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
angellist_api-1.0.2 | spec/integration/search_spec.rb |