spec/zunnit_spec.rb in zunnit-0.0.2 vs spec/zunnit_spec.rb in zunnit-0.0.3
- old
+ new
@@ -1,7 +1,20 @@
# encoding: utf-8
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
describe Zunnit do
+ describe "url_for" do
+ it "return url for related item" do
+ url = Zunnit.url_for(:related_items)
+ url.should == "http://api.zunnit.com/busk/related/items?api_key=busk"
+ end
+ end
+
+ describe "get" do
+ it "should return related items" do
+ response = Zunnit.get(:related_items, {:item_id=>"20275919"})
+ response.status.should == 200
+ end
+ end
end