Sha256: ddf07b8107a6ffbca506bc95021b858874fd77138e7b5b2a39638b1d65f1e423

Contents?: true

Size: 844 Bytes

Versions: 46

Compression:

Stored size: 844 Bytes

Contents

require 'spec_helper'

describe QuickSearch do

  before :each do
    stub_auth_request
  end

  context '/searchtemplates/quicksearches' do
    it "gets a current user's quick searches" do
      s = stub_api_get("/searchtemplates/quicksearches", "search_templates/quick_searches/get.json")
      quicksearches = QuickSearch.get
      quicksearches.should be_an(Array)
      quicksearches.size.should eq(2)
      s.should have_been_requested
    end
  end

  context '/searchtemplates/quicksearches/<id>' do
    let(:id) { "20121128132106172132000004" }
    it "gets an individual quick search" do
      s = stub_api_get("/searchtemplates/quicksearches/#{id}", "search_templates/quick_searches/get.json")
      quicksearch = QuickSearch.find(id)
      quicksearch.should be_an(QuickSearch)
      s.should have_been_requested
    end
  end

end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
spark_api-1.4.12 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.11 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.10 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.9 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.8 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.6 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.5 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.4 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.2 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.1 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.0 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.28 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.27 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.26 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.25 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.24 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.23 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.21 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.20 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.19 spec/unit/spark_api/models/search_template/quick_search_spec.rb