mirror of
https://github.com/TracksApp/tracks.git
synced 2026-03-03 11:30:15 +01:00
remove some dynamic finders (they are deprecated for rails4) and add test for untested method of context.rb
This commit is contained in:
parent
402b078c02
commit
583664be36
4 changed files with 65 additions and 59 deletions
|
|
@ -69,4 +69,10 @@ class ContextTest < ActiveSupport::TestCase
|
|||
assert_equal '', c.name
|
||||
end
|
||||
|
||||
def test_new_record_before_save
|
||||
assert !@agenda.new_record_before_save?, "existing records should not be new_record"
|
||||
c = Context.where(:name => "I do not exist").first_or_create
|
||||
assert c.new_record_before_save?, "newly created record should be new_record"
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue