Sha256: a26b0378cba60b63986eca8fa68cc98d9994bdc9a7b4b2570c9cf18d886c8da5

Contents?: true

Size: 796 Bytes

Versions: 5

Compression:

Stored size: 796 Bytes

Contents

require 'spec_helper'

describe AngellistApi::Client::Tags,
  :vcr => { :cassette_name => 'tags' } do

  let(:client) { AngellistApi::Client.new }

  it 'gets info for a tag' do
    tag = client.get_tag(856)
    tag.display_name.should eq 'Venture Capital'
  end

  it "gets a tag's children" do
    children = client.get_tag_children(856).children
    children.map { |tag| tag.display_name }.should include 'Venture Hacks'
  end

  it "gets a tag's parents" do
    parents = client.get_tag_parents(856).parents
    parents.map { |tag| tag.display_name }.should include 'Organized Crime'  # WTF?
  end

  it 'gets startups tagged with a given tag' do
    tagged = client.get_tag_startups(856)
    tagged.should have_key :startups
    tagged.startups.first.should have_key :company_url
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
angellist_api-1.0.7 spec/integration/tags_spec.rb
angellist_api-1.0.6 spec/integration/tags_spec.rb
angellist_api-1.0.5 spec/integration/tags_spec.rb
angellist_api-1.0.4 spec/integration/tags_spec.rb
angellist_api-1.0.3 spec/integration/tags_spec.rb