Sha256: 5538a18f8242419832494db163b0312bcbf33bf66533724033c2443b5c6fdfd6
Contents?: true
Size: 930 Bytes
Versions: 2
Compression:
Stored size: 930 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}", '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}", '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}", '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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
flexmls_api-0.6.5 | spec/unit/flexmls_api/models/saved_search_spec.rb |
flexmls_api-0.6.4 | spec/unit/flexmls_api/models/saved_search_spec.rb |