Fixing the model tests to that they pass for the changes from #168, and updating the CHANGELOG.
This commit is contained in:
parent
4099de1a3a
commit
8414dd5cfd
|
@ -7,5 +7,7 @@
|
|||
if attribute value is changing.
|
||||
- [#173](https://github.com/airblade/paper_trail/pull/173) - Update link to [diff-lcs](https://github.com/halostatue/diff-lcs).
|
||||
- [#172](https://github.com/airblade/paper_trail/pull/172) - Save `object_changes` on creation.
|
||||
- [#168](https://github.com/airblade/paper_trail/pull/168) - Respect conditional `:if` or `:unless` arguments to the
|
||||
`has_paper_trail` method for `destroy` events.
|
||||
- [#167](https://github.com/airblade/paper_trail/pull/167) - Fix `originator` method so that it works with subclasses and STI.
|
||||
- [#160](https://github.com/airblade/paper_trail/pull/160) - Fixed failing tests and resolved out of date dependency issues.
|
|
@ -81,12 +81,8 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
context 'after destroy' do
|
||||
setup do
|
||||
@translation.save!
|
||||
@translation.destroy
|
||||
end
|
||||
|
||||
should_not_change('the number of versions') { Version.count }
|
||||
setup { @translation.destroy }
|
||||
should 'not change the number of versions' do assert_equal(0, Version.count) end
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -118,12 +114,8 @@ class HasPaperTrailModelTest < ActiveSupport::TestCase
|
|||
end
|
||||
|
||||
context 'after destroy' do
|
||||
setup do
|
||||
@translation.save!
|
||||
@translation.destroy
|
||||
end
|
||||
|
||||
should_change('the number of versions', :by => 1) { Version.count }
|
||||
setup { @translation.destroy }
|
||||
should 'change the number of versions' do assert_equal(2, Version.count) end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue