Sha256: ab04198911625f62748f84108c14ac0193298d88efcbd505a51c019a65179483

Contents?: true

Size: 948 Bytes

Versions: 1

Compression:

Stored size: 948 Bytes

Contents

require 'ostruct'
require 'iremix/video'

module Iremix
  describe Video do
    it "returns videos" do
      token = OpenStruct.new(:token => '123abc')
      response = OpenStruct.new(:parsed => {"videos"=>[{"id"=>7820, "title"=>"Mouse Mantis", "video_url"=>"http://remix-development.s3.amazonaws.com/a0f0bdf33073704d18553f5af88555ff.mp4", "person_id"=>28294, "screenshot_url"=>"http://remix-development.s3.amazonaws.com/a0f0bdf33073704d18553f5af88555ff_2.jpg", "description"=>"
                                mouse mantis

                                ", "tags"=>["mouse mantis"], "group_id"=>nil, "created_at"=>"2012-04-03T15:53:31-05:00", "updated_at"=>"2012-04-03T15:54:12-05:00"}]})
      token.should_receive(:get)
            .with('/api/v1/videos.json',
                  :params => { :access_token => '123abc' })
            .and_return(response)

      videos = Video.all(token)
      videos.first.id.should == 7820
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
iremix-ruby-0.0.5 spec/iremix/video_spec.rb