mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
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
1 changed files with 9 additions and 0 deletions
|
@ -49,4 +49,13 @@ class PaperTrailCleanerTest < ActiveSupport::TestCase
|
||||||
assert_equal 1, Version.all.count
|
assert_equal 1, Version.all.count
|
||||||
assert_equal "Animal Muppet", @animal.name
|
assert_equal "Animal Muppet", @animal.name
|
||||||
end
|
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
|
end
|
||||||
|
|
Loading…
Reference in a new issue