Sha256: f73ec1bae5b7e1efef289c8812dae896fbc36f7f58ca0a5e6d70769d9bbf39fe

Contents?: true

Size: 1.12 KB

Versions: 8

Compression:

Stored size: 1.12 KB

Contents

require File.dirname(__FILE__) + '/../test_helper'

class FlickrTest < Test::Unit::TestCase

  ####################
  #--- url        ---#
  ####################
  def test_url_should_return_non_secure_flickr_url
    obj = ::Faces::Providers::Flickr.new
    url = obj.url('12037949754@N01', {:flickr_api_key => '5ad55b17c6964b3c83651522576af9ca'})
    assert_match 'static.flickr.com', url
    assert_match 'http://farm', url
  end
  
  ####################
  #--- html       ---#
  ####################
  def test_html_should_return_non_secure_flickr_html
    obj = ::Faces::Providers::Flickr.new
    html = obj.html('12037949754@N01', {:flickr_api_key => '5ad55b17c6964b3c83651522576af9ca'})
    assert_match 'static.flickr.com', html
    assert_match '<img src="http://farm', html
  end
  
  ####################
  #--- exists?    ---#
  ####################
  def test_exists_should_return_true_if_avatar_exists
    obj = ::Faces::Providers::Flickr.new
    result = obj.exists?('12037949754@N01', {:flickr_api_key => '5ad55b17c6964b3c83651522576af9ca'})
    assert_equal true, result, 'Avatar does exist, should have returned true'
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
faces-0.6.5 test/providers/test_flickr.rb
faces-0.6.4 test/providers/test_flickr.rb
faces-0.6.3 test/providers/test_flickr.rb
faces-0.6.2 test/providers/test_flickr.rb
faces-0.6.1 test/providers/test_flickr.rb
faces-0.6.0 test/providers/test_flickr.rb
faces-0.5.1 test/providers/test_flickr.rb
faces-0.5.0 test/providers/test_flickr.rb