mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-05 15:31:47 +01:00
fix tags and fix tests
This commit is contained in:
parent
c618d35d3a
commit
0e68ded56a
8 changed files with 856 additions and 836 deletions
|
|
@ -4,7 +4,26 @@ class TagTest < Test::Rails::TestCase
|
|||
fixtures :tags
|
||||
|
||||
# Replace this with your real tests.
|
||||
def test_truth
|
||||
assert true
|
||||
def test_find_or_create_with_single_word
|
||||
tag = Tag.find_or_create_by_name("test")
|
||||
assert !tag.new_record?
|
||||
end
|
||||
|
||||
def test_find_or_create_with_space
|
||||
tag = Tag.find_or_create_by_name("test test")
|
||||
assert !tag.new_record?
|
||||
end
|
||||
|
||||
def test_find_or_create_with_dot
|
||||
tag = Tag.find_or_create_by_name("a.b.c")
|
||||
assert !tag.new_record?
|
||||
end
|
||||
|
||||
def test_find_or_create_with_number_as_string
|
||||
tag = Tag.find_or_create_by_name("12343")
|
||||
assert !tag.new_record?
|
||||
|
||||
tag = Tag.find_or_create_by_name("8.1.2")
|
||||
assert !tag.new_record?
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue