Sha256: acd775cd2ef963e1d15cc29f4ee6639c7c50b085ba69f22c143be083bf0dce72

Contents?: true

Size: 890 Bytes

Versions: 1

Compression:

Stored size: 890 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

1 entries across 1 versions & 1 rubygems

Version Path
totter-0.2.1 test/totter/client/avatars_test.rb