Added an additional test to test the passing in of a variable number of versions to keep.

This commit is contained in:
Sean Marcia 2013-07-16 20:55:39 -04:00
parent d6faa94c85
commit c480b5b709
1 changed files with 9 additions and 0 deletions

View File

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