Sha256: 407656a8ed2fcdbb349e970d0b99fd15f49ecc720c0503cea38faf59103d5a6b

Contents?: true

Size: 1007 Bytes

Versions: 12

Compression:

Stored size: 1007 Bytes

Contents

require './spec/spec_helper'

describe Video do

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

  it "has a type" do
    expect(Video.new(:Type => "branded").branded?).to eq(true)
    expect(Video.new(:Type => "unbranded").branded?).to eq(false)
    expect(Video.new(:Type => "unbranded").unbranded?).to eq(true)
    expect(Video.new(:Type => "branded").unbranded?).to eq(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')
      expect(p).to be_an(Array)
      expect(p.length).to eq(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

12 entries across 12 versions & 1 rubygems

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