public
Rubygem
Description: Ruby helpers for avatar display
Clone URL: git://github.com/gcnovus/avatar.git
avatar / test / test_static_url_source.rb
100644 18 lines (13 sloc) 0.42 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
require File.dirname(__FILE__) + '/test_helper.rb'
require 'avatar/source/static_url_source'
 
class TestStaticUrlSource < Test::Unit::TestCase
  
  def setup
    @source = Avatar::Source::StaticUrlSource.new('foobar')
  end
  
  def test_nil_when_person_is_nil
    assert_nil @source.avatar_url_for(nil)
  end
  
  def test_not_nil_when_person_is_not_nil
    assert_equal 'foobar', @source.avatar_url_for(7)
  end
  
end