Sha256: 94755791f355008ef827366a34bd0f63541386eb9b074e24b7d14c4f89f09b06
Contents?: true
Size: 957 Bytes
Versions: 3
Compression:
Stored size: 957 Bytes
Contents
require './spec/spec_helper' describe SavedSearch do before(:each) do stub_auth_request end let(:id){ "20100815220615294367000000" } it "should get all SavedSearches" do stub_api_get("/#{subject.class.element_name}", 'listings/saved_search.json') resources = subject.class.get resources.should be_an(Array) resources.length.should eq(2) resources.first.Id.should eq(id) end it "should get a SavedSearch" do stub_api_get("/#{subject.class.element_name}/#{id}", 'listings/saved_search.json') resource = subject.class.find(id) resource.Id.should eq(id) resource.Name.should eq("Search name here") end it "should get provided SavedSearches" do stub_api_get("/provided/#{subject.class.element_name}", 'listings/saved_search.json') resources = subject.class.provided.get resources.should be_an(Array) resources.length.should eq(2) resources.first.Id.should eq(id) end end
Version data entries
3 entries across 3 versions & 1 rubygems