mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 03:00:12 +01:00
Allow projects to have commas in their name.
This removes the validation that checks to make sure there is no comma in the name, and updates the tests to match.
This commit is contained in:
parent
5cbc0b26c8
commit
55bf457740
4 changed files with 9 additions and 8 deletions
|
|
@ -31,12 +31,12 @@ class ProjectTest < ActiveSupport::TestCase
|
|||
assert_equal "already exists", newproj.errors.on(:name)
|
||||
end
|
||||
|
||||
def test_validate_name_does_not_contain_comma
|
||||
def test_validate_name_can_contain_comma
|
||||
newproj = Project.new
|
||||
newproj.name = "Buy iPhones for Luke,bsag,David Allen"
|
||||
assert !newproj.save
|
||||
assert_equal 1, newproj.errors.count
|
||||
assert_equal "cannot contain the comma (',') character", newproj.errors.on(:name)
|
||||
assert newproj.save
|
||||
assert_equal 0, newproj.errors.count
|
||||
assert_equal "Buy iPhones for Luke,bsag,David Allen", newproj.name
|
||||
end
|
||||
|
||||
def test_name_removes_extra_spaces
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue