test/unit/model_test.rb in paper_trail-2.2.5 vs test/unit/model_test.rb in paper_trail-2.2.6

- old
+ new

@@ -385,20 +385,23 @@ @foo = FooWidget.create @foo.update_attributes :name => 'Fooey' end should 'reify with the correct type' do - thing = @foo.versions.last.reify + thing = Version.last.reify assert_kind_of FooWidget, thing + assert_equal @foo.versions.first, Version.last.previous + assert_nil Version.last.next end - context 'when destroyed' do setup { @foo.destroy } should 'reify with the correct type' do - thing = @foo.versions.last.reify + thing = Version.last.reify assert_kind_of FooWidget, thing + assert_equal @foo.versions[1], Version.last.previous + assert_nil Version.last.next end end end