require 'test_helper' class AvatarsTest < Totter::TestCase def test_avatar VCR.use_cassette 'avatars/show' do client = local_client avatar = client.avatar(1, 1) assert_equal 1, avatar.id end end def test_avatars VCR.use_cassette 'avatars/index' do client = local_client avatars = client.avatars(1) assert_equal Array, avatars.class assert_equal 1, avatars.length end end def test_create_avatar VCR.use_cassette 'avatars/create' do client = local_client avatar = client.create_avatar(1, 'http://google.com') assert_equal 1, avatar.user_id assert avatar.upload end end def test_destroy_avatar VCR.use_cassette 'avatars/destroy' do client = local_client avatar = client.create_avatar(1) assert client.destroy_avatar(avatar.user_id, avatar.id) end end end