spec/omnicontacts/importer/yahoo_spec.rb in omnicontacts-0.1.2 vs spec/omnicontacts/importer/yahoo_spec.rb in omnicontacts-0.1.3

- old
+ new

@@ -36,7 +36,16 @@ result.size.should be(1) result.first[:name].should eq("John Doe") result.first[:email].should eq("john@yahoo.com") end + it "should return an empty list of contacts" do + empty_contacts_list = '{"contacts": {"start":0, "count":0}}' + yahoo.should_receive(:fetch_access_token).and_return(["access_token", "access_token_secret", "guid"]) + yahoo.should_receive(:http_get).and_return(empty_contacts_list) + result = yahoo.fetch_contacts_from_token_and_verifier "auth_token", "auth_token_secret", "oauth_verifier" + result.should be_empty + + end + end end