remove some dynamic finders (they are deprecated for rails4) and add test for untested method of context.rb

This commit is contained in:
Reinier Balt 2013-02-25 10:21:04 +01:00
parent 402b078c02
commit 583664be36
4 changed files with 65 additions and 59 deletions

View file

@ -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