Sha256: 2ff1f18cb547519b6fd0d6c3ec5cfc124a3a7a478139cc136a3b4c6cda69a3b0
Contents?: true
Size: 1 KB
Versions: 2
Compression:
Stored size: 1 KB
Contents
require 'spec_helper' module Beatport::Catalog describe Autocomplete do 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_not 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
beatport-0.1.3 | spec/catalog/autocomplete_spec.rb |
beatport-0.1.2 | spec/catalog/autocomplete_spec.rb |