Sha256: 76600a94ff394a48df42ee471c8688093f156c8664ec468594a3107495b37d3f

Contents?: true

Size: 966 Bytes

Versions: 61

Compression:

Stored size: 966 Bytes

Contents

require './spec/spec_helper'

describe Video do

  it "responds to" do
    Video.should respond_to(:find_by_listing_key)
    Video.new.should respond_to(:branded?)
    Video.new.should respond_to(:unbranded?)
  end

  it "has a type" do
    Video.new(:Type => "branded").branded?.should == true
    Video.new(:Type => "unbranded").branded?.should == false
    Video.new(:Type => "unbranded").unbranded?.should == true
    Video.new(:Type => "branded").unbranded?.should == false
  end

  describe "/listings/<listing_id>/videos", :support do
    before do
      stub_auth_request
      stub_api_get('/listings/1234/videos','listings/videos_index.json')
    end

    on_get_it "should get an array of videos" do
      p = Video.find_by_listing_key('1234')
      p.should be_an(Array)
      p.length.should == 2
    end

  end

  context "/listings/<listing_id>/videos/<video_id>", :support do
    on_get_it "should return information about a single video"
  end

end

Version data entries

61 entries across 61 versions & 1 rubygems

Version Path
spark_api-1.4.34 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.32 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.31 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.29 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.28 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.27 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.26 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.25 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.24 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.23 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.22 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.21 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.20 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.19 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.18 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.17 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.16 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.15 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.14 spec/unit/spark_api/models/video_spec.rb
spark_api-1.4.13 spec/unit/spark_api/models/video_spec.rb