Sha256: 1be71fd9d024097d42bdcb9f7cb44f9e418afddf2581458dfb9251e34831a482

Contents?: true

Size: 1.13 KB

Versions: 12

Compression:

Stored size: 1.13 KB

Contents

require './spec/spec_helper'

require 'time'

describe TourOfHome do
  subject do
    TourOfHome.new(
      'ResourceUri'=>"/listings/20060725224713296297000000/tourofhomes/20101127153422574618000000",
      'Id'=>"20101127153422574618000000",
      'Date'=>"10/01/2010",
      'StartTime'=>"9:00 am",
      'EndTime'=>"11:00 pm",
      'Comments'=>"Wonderful home; must see!",
      'AdditionalInfo'=> [{"Hosted By"=>"Joe Smith"}, {"Host Phone"=>"123-456-7890"}, {"Tour Area"=>"North-Central"}]
    )
  end

  it "should respond to a few methods" do
    expect(subject.class).to respond_to(:find_by_listing_key)
  end

  context "/listings/<listing_id>/tourofhomes", :support do
    on_get_it "should get home tours for a listing" do
      stub_auth_request
      stub_api_get('/listings/20060725224713296297000000/tourofhomes','listings/tour_of_homes.json')
      v = subject.class.find_by_listing_key('20060725224713296297000000')
      expect(v).to be_an(Array)
      expect(v.length).to eq(2)
    end
  end

  context "/listings/<listing_id>/tourofhomes/<tour_id>", :support do
    on_get_it "should get information for a single tour of a home"
  end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
spark_api-1.6.3 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.6.2 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.6.1 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.5.7 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.6.0 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.5.6 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.5.5 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.5.4 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.5.3 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.5.2 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.5.1 spec/unit/spark_api/models/tour_of_home_spec.rb
spark_api-1.5.0 spec/unit/spark_api/models/tour_of_home_spec.rb