Sha256: e6e88c3e3624f35b393c26b847dc18c49c6397362de40a65bd98d2cf55054f0e

Contents?: true

Size: 1.17 KB

Versions: 17

Compression:

Stored size: 1.17 KB

Contents

require 'test_helper'

class GroupTest < Test::Unit::TestCase
  
  context "vimeo simple group" do
    
    setup do
      @group_name = "worldtour"
    end
    
    context "making api calls" do
      
      should "be able to see videos in a group" do
        stub_get("/group/#{@group_name}/videos.json", "simple/group/videos.json")
        videos = Vimeo::Simple::Group.videos(@group_name)
        
        assert_equal 10, videos.size
        first = videos.first
        assert_equal "Vimeo Offline Party: London", first["title"]
      end
      
      should "be able to see users in a group" do
        # This fixture file has been shortened.
        stub_get("/group/#{@group_name}/users.json", "simple/group/users.json")
        users = Vimeo::Simple::Group.users(@group_name)
        
        assert_equal 1, users.size
        first = users.first
        assert_equal "cris", first["display_name"]
      end

      should "be able to get information about a group" do
        stub_get("/group/#{@group_name}/info.json", "simple/group/info.json")
        info = Vimeo::Simple::Group.info(@group_name)
        
        assert_equal "20067", 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/group_test.rb
vimeo-1.5.3 test/vimeo/simple/group_test.rb
slainer68_vimeo-1.5.2 test/vimeo/simple/group_test.rb
vimeo-1.5.2 test/vimeo/simple/group_test.rb
vimeo-1.5.1 test/vimeo/simple/group_test.rb
vimeo-1.5.0 test/vimeo/simple/group_test.rb
slainer68_vimeo-1.4.4 test/vimeo/simple/group_test.rb
slainer68_vimeo-1.4.3 test/vimeo/simple/group_test.rb
vimeo-1.4.3 test/vimeo/simple/group_test.rb
vimeo-1.4.2 test/vimeo/simple/group_test.rb
vimeo-1.4.1 test/vimeo/simple/group_test.rb
vimeo-1.4.0 test/vimeo/simple/group_test.rb
vimeo-1.3.0 test/vimeo/simple/group_test.rb
vimeo-1.2.2 test/vimeo/simple/group_test.rb
vimeo-1.2.0 test/vimeo/simple/group_test.rb
vimeo-1.1.0 test/vimeo/simple/group_test.rb
vimeo-1.0.0 test/vimeo/simple/group_test.rb