added notes

This commit is contained in:
albert
2010-02-24 15:40:55 -05:00
parent 7bb935256b
commit 55700efeb1
17 changed files with 462 additions and 27 deletions

View File

@@ -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