spec/api/photos_spec.rb in vkontakte-0.0.4 vs spec/api/photos_spec.rb in vkontakte-0.0.5

- old
+ new

@@ -1,6 +1,5 @@ -# encoding: utf-8 require "spec_helper" describe Vkontakte::Api::Photos do it "should be valid" do Vkontakte::Api::Photos.should be_a(Module) @@ -20,9 +19,19 @@ FakeWeb.register_uri(:get, "https://api.vk.com/method/photos.getAlbums?access_token=#{@token}", :body => response) @iframe.photos.getAlbums.should == [{"aid" => "17071606","thumb_id" => "98054577","owner_id" => "6492","title" => "", "description" => "","created" => "1204576880","updated" => "1229532461", "size" => "3","privacy" => "0"}] + end + + it "should be call getAllComments method" do + response = '{"response": { "items": [1,2,3] }}' + + FakeWeb.register_uri(:get, + "https://api.vk.com/method/photos.getAllComments?access_token=#{@token}&owner_id=2592709", + :body => response) + + @iframe.photos.getAllComments(:owner_id => 2592709)["items"].size.should == 3 end end end