mirror of
https://github.com/TracksApp/tracks.git
synced 2025-09-22 05:50:47 +02:00
#1955: Add user_id to tag test fixtures to fix tests
This commit is contained in:
parent
f6d1f243c5
commit
6b54962388
2 changed files with 8 additions and 5 deletions
5
test/fixtures/tags.yml
vendored
5
test/fixtures/tags.yml
vendored
|
@ -10,18 +10,21 @@ end
|
|||
foo:
|
||||
id: 1
|
||||
name: foo
|
||||
user_id: 1
|
||||
created_at: <%= today %>
|
||||
updated_at: <%= today %>
|
||||
|
||||
bar:
|
||||
id: 2
|
||||
name: bar
|
||||
user_id: 1
|
||||
created_at: <%= today %>
|
||||
updated_at: <%= today %>
|
||||
|
||||
baz:
|
||||
id: 3
|
||||
name: baz
|
||||
user_id: 1
|
||||
created_at: <%= today %>
|
||||
updated_at: <%= today %>
|
||||
|
||||
|
||||
|
|
|
@ -25,20 +25,20 @@ class TagTest < ActiveSupport::TestCase
|
|||
tag = Tag.where(:name => "8.1.2").first_or_create
|
||||
assert !tag.new_record?
|
||||
end
|
||||
|
||||
|
||||
def test_tag_name_always_lowercase
|
||||
tag = Tag.where(:name => "UPPER").first_or_create
|
||||
assert !tag.new_record?
|
||||
|
||||
|
||||
upper = Tag.where(:name => "upper").first
|
||||
assert_not_nil upper
|
||||
assert upper.name == "upper"
|
||||
end
|
||||
|
||||
|
||||
def test_tag_name_stripped_of_spaces
|
||||
tag = Tag.where(:name => " strip spaces ").first_or_create
|
||||
assert !tag.new_record?
|
||||
|
||||
|
||||
assert tag.name == "strip spaces"
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue