Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- A_PERSON = { :text_id => 'whatev',
- :first_name => 'Jim',
- :last_name => 'Morrison',
- :suffix => '',
- :display_name => 'lizard_king',
- :email => '[email protected]',
- :email2 => '[email protected]' }
- def setup
- @jimbo = Person.new(A_PERSON)
- end
- def test_person_should_be_invalid_if_first_name_too_long
- assert @jimbo.valid?
- @jimbo.first_name = add_dummy_chars(51, @jimbo.first_name)
- assert_equal false, @jimbo.valid?
- end
- def test_person_should_be_invalid_if_last_name_too_long
- assert_equal @jimbo.first_name, 'Jim'
- @jimbo.last_name = add_dummy_chars(51, @jimbo.last_name)
- assert_equal false, @jimbo.valid?
- end
Add Comment
Please, Sign In to add comment