mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
adding a test for slug behavior
This commit is contained in:
parent
756b32ef39
commit
e1b51955f1
1 changed files with 4 additions and 0 deletions
|
@ -366,6 +366,10 @@ class BasicsTest < ActiveRecord::TestCase
|
|||
assert_equal Topic.find(1), Topic.find(2).topic
|
||||
end
|
||||
|
||||
def test_find_by_slug
|
||||
assert_equal Topic.find('1-meowmeow'), Topic.find(1)
|
||||
end
|
||||
|
||||
def test_equality_of_new_records
|
||||
assert_not_equal Topic.new, Topic.new
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue