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.34 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.32 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.31 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.29 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.28 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.27 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.26 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.25 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.24 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.23 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.22 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.21 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.20 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.19 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.18 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.17 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.16 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.15 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.14 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.4.13 spec/unit/spark_api/models/search_template/quick_search_spec.rb