Sha256: 4c914ecfd01a93d5c1c578e04b23c7420bc273535be3809f2de8646a4c25ccb8
Contents?: true
Size: 750 Bytes
Versions: 1
Compression:
Stored size: 750 Bytes
Contents
require 'spec_helper' describe AngellistApi::Client::Search, :vcr => { :cassette_name => 'search' } do let(:client) { AngellistApi::Client.new } let(:valid_types) { %w[User Startup MarketTag LocationTag SkillTag].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.1.0 | spec/integration/search_spec.rb |