Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tag: v0.3.3
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (18 sloc) 0.777 kb
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
Jump to Line
Something went wrong with that request. Please try again.