mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-06 17:28:50 +01:00
Remove private variable usage from models
It seems that `@new_record_before_save` as an instance variable has been present since around 2007 and it wasn't until Rails 5.1 that things were changed in such a way to make this inaccessible now.
This commit is contained in:
parent
78742d15b8
commit
32d267d6cd
5 changed files with 4 additions and 22 deletions
|
|
@ -61,12 +61,6 @@ 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
|
||||
|
||||
def test_hide_context
|
||||
assert @agenda.active?
|
||||
@agenda.hide!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue