Sha256: 2b6d4d1112310abb685ef337d8f8c8d7eac0fbec0df0cf33779fd614adccefff

Contents?: true

Size: 833 Bytes

Versions: 17

Compression:

Stored size: 833 Bytes

Contents

require 'test_helper'

class ChannelTest < Test::Unit::TestCase
  
  context "vimeo simple channel" do
    
    setup do
      @channel_name = "canon7d"
    end
    
    context "making api calls" do
      
      should "be able to see videos in a channel" do
        stub_get("/channel/#{@channel_name}/videos.json", "simple/channel/videos.json")
        videos = Vimeo::Simple::Channel.videos(@channel_name)
        
        assert_equal 20, videos.size
        first = videos.first
        assert_equal "7D Test 03", first["title"]
      end

      should "be able to get information about a channel" do
        stub_get("/channel/#{@channel_name}/info.json", "simple/channel/info.json")
        info = Vimeo::Simple::Channel.info(@channel_name)
        
        assert_equal "58337", info["id"]
      end
      
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
vimeo-1.5.4 test/vimeo/simple/channel_test.rb
vimeo-1.5.3 test/vimeo/simple/channel_test.rb
slainer68_vimeo-1.5.2 test/vimeo/simple/channel_test.rb
vimeo-1.5.2 test/vimeo/simple/channel_test.rb
vimeo-1.5.1 test/vimeo/simple/channel_test.rb
vimeo-1.5.0 test/vimeo/simple/channel_test.rb
slainer68_vimeo-1.4.4 test/vimeo/simple/channel_test.rb
slainer68_vimeo-1.4.3 test/vimeo/simple/channel_test.rb
vimeo-1.4.3 test/vimeo/simple/channel_test.rb
vimeo-1.4.2 test/vimeo/simple/channel_test.rb
vimeo-1.4.1 test/vimeo/simple/channel_test.rb
vimeo-1.4.0 test/vimeo/simple/channel_test.rb
vimeo-1.3.0 test/vimeo/simple/channel_test.rb
vimeo-1.2.2 test/vimeo/simple/channel_test.rb
vimeo-1.2.0 test/vimeo/simple/channel_test.rb
vimeo-1.1.0 test/vimeo/simple/channel_test.rb
vimeo-1.0.0 test/vimeo/simple/channel_test.rb