Sha256: 64471c646da8c13862ab4c068acebc83fdc9ed2c3eb18bec27ab58a9202ffd04
Contents?: true
Size: 1.12 KB
Versions: 3
Compression:
Stored size: 1.12 KB
Contents
require 'spec_helper' module Beatport::Catalog describe Autocomplete do before :each do VCR.insert_cassette 'autocomplete' end after :each do VCR.eject_cassette end describe 'stucture' do subject { Autocomplete.query('lutzen').first } its (:'name.downcase') { should match(/lutzen/) } end describe 'collection' do subject { Autocomplete.query('lutzen') } its (:host) { should == "api.beatport.com" } its (:path) { should == "/catalog/autocomplete" } its (:query) { should == "query=lutzen" } its (:page) { should == 1 } its (:per_page) { should == 10 } its (:count) { should be > 1 } its (:total_pages) { should be > 1 } its (:next_query) { should == "query=lutzen&page=2"} its (:per_page_options) { should_not be_nil } its (:facets) { should_not be_nil } its (:spellcheck) { should be_nil } end describe '.query' do subject { Autocomplete.query('lutzen', :page => 3, :per_page => 2) } its (:page) { should == 3 } its (:per_page) { should == 2 } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
beatport-0.2.1 | spec/catalog/autocomplete_spec.rb |
beatport-0.2.0 | spec/catalog/autocomplete_spec.rb |
beatport-0.1.10 | spec/catalog/autocomplete_spec.rb |