Guest User

Untitled

a guest
Mar 6th, 2018
239
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.75 KB | None | 0 0
  1. A_PERSON = { :text_id => 'whatev',
  2. :first_name => 'Jim',
  3. :last_name => 'Morrison',
  4. :suffix => '',
  5. :display_name => 'lizard_king',
  6. :email => '[email protected]',
  7. :email2 => '[email protected]' }
  8.  
  9. def setup
  10. @jimbo = Person.new(A_PERSON)
  11. end
  12.  
  13. def test_person_should_be_invalid_if_first_name_too_long
  14. assert @jimbo.valid?
  15. @jimbo.first_name = add_dummy_chars(51, @jimbo.first_name)
  16. assert_equal false, @jimbo.valid?
  17. end
  18.  
  19. def test_person_should_be_invalid_if_last_name_too_long
  20. assert_equal @jimbo.first_name, 'Jim'
  21. @jimbo.last_name = add_dummy_chars(51, @jimbo.last_name)
  22. assert_equal false, @jimbo.valid?
  23. end
Add Comment
Please, Sign In to add comment