Sha256: 23d3b06c5998b08ce48cf2ded8a318aae5357a73b6f067082adce4c69285830c

Contents?: true

Size: 555 Bytes

Versions: 2

Compression:

Stored size: 555 Bytes

Contents

require File.dirname(__FILE__) + '/../test_helper'

class CategoryTest < Test::Unit::TestCase
  include Upcoming
  
  context "when using the category API" do
    setup do
      Upcoming.api_key = 'OU812'
    end

    should "retrieve a list of valid event categories" do
      stub_get "http://upcoming.yahooapis.com/services/rest/?method=category.getList&api_key=OU812&format=json", 'categories.json'
      categories = Upcoming::Category.list
      categories.first.name.should == 'Music'
      categories.last.id.should == 13
    end
    
  end
  
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
squeejee-upcoming-events-0.0.1 test/upcoming/category_test.rb
upcoming-events-0.0.1 test/upcoming/category_test.rb