added notes
This commit is contained in:
@@ -39,6 +39,7 @@ class PostTest < ActiveSupport::TestCase
|
||||
should "be created on any save" do
|
||||
@user = Factory.create(:user)
|
||||
@post = Factory.create(:post)
|
||||
@reverter = Factory.create(:user)
|
||||
assert_equal(1, @post.versions.size)
|
||||
|
||||
@post.rating = "e"
|
||||
@@ -49,7 +50,7 @@ class PostTest < ActiveSupport::TestCase
|
||||
assert_equal(@user.id, @post.versions.last.updater_id)
|
||||
assert_equal("125.0.0.0", @post.versions.last.updater_ip_addr)
|
||||
|
||||
@post.revert_to!(PostVersion.first)
|
||||
@post.revert_to!(PostVersion.first, @reverter.id, "127.0.0.1")
|
||||
assert_equal("tag1 tag2", @post.tag_string)
|
||||
assert_equal("q", @post.rating)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user