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.3.18 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.17 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.16 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.15 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.14 spec/unit/spark_api/models/search_template/quick_search_spec.rb
spark_api-1.3.13 spec/unit/spark_api/models/search_template/quick_search_spec.rb