Added an additional test to test the passing in of a variable number of versions to keep.
This commit is contained in:
parent
d6faa94c85
commit
c480b5b709
|
@ -49,4 +49,13 @@ class PaperTrailCleanerTest < ActiveSupport::TestCase
|
|||
assert_equal 1, Version.all.count
|
||||
assert_equal "Animal Muppet", @animal.name
|
||||
end
|
||||
|
||||
test 'cleaner accepts variable arguments' do
|
||||
@animal = Animal.create :name => 'Animal'
|
||||
@animal.update_attributes :name => 'Animal from the Muppets'
|
||||
@animal.update_attributes :name => 'Animal Muppet'
|
||||
PaperTrail.clean_paper_trail_versions(2)
|
||||
assert_equal 2, Version.all.count
|
||||
assert_equal "Animal Muppet", @animal.name
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue