Sha256: 85dbf6012b8e73ea7d12d4e8ab74e0c934349976b84d7a65f51a74a46babc9b8

Contents?: true

Size: 1.22 KB

Versions: 61

Compression:

Stored size: 1.22 KB

Contents

require './spec/spec_helper'

describe VirtualTour do
  before(:each) do
    @virtualtour = VirtualTour.new({
      :Uri => "http://www.flexmls.com/",
      :ResourceUri => "/v1/listings/20060712220814669202000000/virtualtours/20110105165843978012000000",
      :Name => "My Branded Tour",
      :Id => "20110105165843978012000000",
      :Type => "branded"
    })
  end

  it "should respond to a few methods" do
    VirtualTour.should respond_to(:find_by_listing_key)
    @virtualtour.should respond_to(:branded?)
    @virtualtour.should respond_to(:unbranded?)
  end

  it "should know if it's branded" do
    @virtualtour.branded?.should == true
    @virtualtour.unbranded?.should == false
  end

  context "/listings/<listing_id>/virtualtours", :support do
    on_get_it "should get virtual tours for a listing" do
      stub_auth_request
      stub_api_get('/listings/1234/virtualtours','listings/virtual_tours_index.json')

      v = VirtualTour.find_by_listing_key('1234')
      v.should be_an(Array)
      v.length.should == 5
    end
  end

  context "/listings/<listing_id>/virtualtours/<tour_id>", :support do
    on_get_it "should return information about a specific virtual tour"
  end

  after(:each) do
    @virtualtour = nil
  end

end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
spark_api-1.3.18 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.17 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.16 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.15 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.14 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.13 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.10 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.9 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.6 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.3 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.1 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.3.0 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.2.1 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.2.0 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.1.2 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.1.1 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.1.0 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.0.4 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.0.2 spec/unit/spark_api/models/virtual_tour_spec.rb
spark_api-1.0.1 spec/unit/spark_api/models/virtual_tour_spec.rb