mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-31 06:18:49 +01:00
fix failing test
This commit is contained in:
parent
eb26e4e5a8
commit
6e654c5d03
1 changed files with 4 additions and 4 deletions
|
|
@ -51,18 +51,18 @@ class TodoTest < ActiveSupport::TestCase
|
|||
|
||||
def test_validate_length_of_description
|
||||
assert_equal "Call dinosaur exterminator", @not_completed2.description
|
||||
@not_completed2.description = generate_random_string(101)
|
||||
@not_completed2.description = generate_random_string(Todo::MAX_DESCRIPTION_LENGTH+1)
|
||||
assert !@not_completed2.save
|
||||
assert_equal 1, @not_completed2.errors.count
|
||||
assert_equal "is too long (maximum is 100 characters)", @not_completed2.errors[:description][0]
|
||||
assert_equal "is too long (maximum is #{Todo::MAX_DESCRIPTION_LENGTH} characters)", @not_completed2.errors[:description][0]
|
||||
end
|
||||
|
||||
def test_validate_length_of_notes
|
||||
assert_equal "Ask him if I need to hire a skip for the corpses.", @not_completed2.notes
|
||||
@not_completed2.notes = generate_random_string(60001)
|
||||
@not_completed2.notes = generate_random_string(Todo::MAX_NOTES_LENGTH+1)
|
||||
assert !@not_completed2.save
|
||||
assert_equal 1, @not_completed2.errors.count
|
||||
assert_equal "is too long (maximum is 60000 characters)", @not_completed2.errors[:notes][0]
|
||||
assert_equal "is too long (maximum is #{Todo::MAX_NOTES_LENGTH} characters)", @not_completed2.errors[:notes][0]
|
||||
end
|
||||
|
||||
def test_validate_show_from_must_be_a_date_in_the_future
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue