Sha256: f28d79221d9c7141eb1e092a046eeeded5608077a2f5398a4836dd10cc348884

Contents?: true

Size: 777 Bytes

Versions: 22

Compression:

Stored size: 777 Bytes

Contents

require File.dirname(__FILE__) + '/helper'
 
class TestUser < Test::Unit::TestCase
  def setup
    
  end
  
  def test_can_create_user
    assert Gattica::User.new('anonymous@anon.com','none')
  end
  
  def test_invalid_email
    assert_raise GatticaError::InvalidEmail do Gattica::User.new('','') end
    assert_raise ArgumentError do Gattica::User.new('') end
    assert_raise GatticaError::InvalidEmail do Gattica::User.new('anonymous','none') end
    assert_raise GatticaError::InvalidEmail do Gattica::User.new('anonymous@asdfcom','none') end
  end
    
  def test_invalid_password
    assert_raise GatticaError::InvalidPassword do Gattica::User.new('anonymous@anon.com','') end
    assert_raise ArgumentError do Gattica::User.new('anonymous@anon.com') end
  end
  
end

Version data entries

22 entries across 22 versions & 6 rubygems

Version Path
cannikin-gattica-0.2.0 test/test_user.rb
cannikin-gattica-0.3.1 test/test_user.rb
cannikin-gattica-0.3.3 test/test_user.rb
cannikin-gattica-0.4.0 test/test_user.rb
jeremyf-gattica-0.3.4 test/test_user.rb
jeremyf-gattica-0.3.6 test/test_user.rb
jeremyf-gattica-0.3.7 test/test_user.rb
jeremyf-gattica-0.3.8 test/test_user.rb
thieso2-gattica-0.3.3.1 test/test_user.rb
thieso2-gattica-0.3.3.2 test/test_user.rb
thieso2-gattica-0.3.3.3 test/test_user.rb
thieso2-gattica-0.3.3.4 test/test_user.rb
thieso2-gattica-0.3.3.5 test/test_user.rb
gicodewarrior-gattica-0.5.2 test/test_user.rb
gicodewarrior-gattica-0.5.1 test/test_user.rb
gicodewarrior-gattica-0.5.0 test/test_user.rb
tupalo-gattica-0.3.5 test/test_user.rb
tupalo-gattica-0.3.4 test/test_user.rb
tupalo-gattica-0.3.3 test/test_user.rb
gattica-0.4.3 test/test_user.rb