test/unit/model_test.rb in paper_trail-3.0.8 vs test/unit/model_test.rb in paper_trail-3.0.9
- old
+ new
@@ -565,13 +565,13 @@
@version = @widget.versions.last # only 1 version
end
should 'track who made the change' do
assert_equal 'Alice', @version.whodunnit
- assert_nil @version.originator
+ assert_nil @version.paper_trail_originator
assert_equal 'Alice', @version.terminator
- assert_equal 'Alice', @widget.originator
+ assert_equal 'Alice', @widget.paper_trail_originator
end
context 'when a record is updated' do
setup do
PaperTrail.whodunnit = 'Bob'
@@ -579,13 +579,13 @@
@version = @widget.versions.last
end
should 'track who made the change' do
assert_equal 'Bob', @version.whodunnit
- assert_equal 'Alice', @version.originator
+ assert_equal 'Alice', @version.paper_trail_originator
assert_equal 'Bob', @version.terminator
- assert_equal 'Bob', @widget.originator
+ assert_equal 'Bob', @widget.paper_trail_originator
end
context 'when a record is destroyed' do
setup do
PaperTrail.whodunnit = 'Charlie'
@@ -593,13 +593,13 @@
@version = PaperTrail::Version.last
end
should 'track who made the change' do
assert_equal 'Charlie', @version.whodunnit
- assert_equal 'Bob', @version.originator
+ assert_equal 'Bob', @version.paper_trail_originator
assert_equal 'Charlie', @version.terminator
- assert_equal 'Charlie', @widget.originator
+ assert_equal 'Charlie', @widget.paper_trail_originator
end
end
end
end
end
@@ -647,10 +647,10 @@
end
should 'should return the correct originator' do
PaperTrail.whodunnit = 'Ben'
@foo.update_attribute(:name, 'Geoffrey')
- assert_equal PaperTrail.whodunnit, @foo.originator
+ assert_equal PaperTrail.whodunnit, @foo.paper_trail_originator
end
context 'when destroyed' do
setup { @foo.destroy }