Sha256: 7576299e004cc2d8f0a6b4bd85a8c45ea4a0aad377f97e2be547151a14cf298c

Contents?: true

Size: 888 Bytes

Versions: 32

Compression:

Stored size: 888 Bytes

Contents

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

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
totter-0.4.8 test/totter/client/avatars_test.rb
totter-0.4.7 test/totter/client/avatars_test.rb
totter-0.4.6 test/totter/client/avatars_test.rb
totter-0.4.5 test/totter/client/avatars_test.rb
totter-0.4.4 test/totter/client/avatars_test.rb
totter-0.4.3 test/totter/client/avatars_test.rb
totter-0.4.2 test/totter/client/avatars_test.rb
totter-0.4.1 test/totter/client/avatars_test.rb
totter-0.4.0 test/totter/client/avatars_test.rb
totter-0.3.9 test/totter/client/avatars_test.rb
totter-0.3.8 test/totter/client/avatars_test.rb
totter-0.3.7 test/totter/client/avatars_test.rb
totter-0.3.6 test/totter/client/avatars_test.rb
totter-0.3.5 test/totter/client/avatars_test.rb
totter-0.3.4 test/totter/client/avatars_test.rb
totter-0.3.3 test/totter/client/avatars_test.rb
totter-0.3.2 test/totter/client/avatars_test.rb
totter-0.3.1 test/totter/client/avatars_test.rb
totter-0.3.0 test/totter/client/avatars_test.rb
totter-0.2.14 test/totter/client/avatars_test.rb