fix tests

This commit is contained in:
albert
2011-12-22 18:22:32 -05:00
parent c1c870294c
commit 5ffd6d552a
6 changed files with 26 additions and 25 deletions

View File

@@ -16,16 +16,16 @@ module Moderator
end
should "execute" do
tag_batch_change = TagBatchChange.new("aaa", "bbb")
tag_batch_change.execute
tag_batch_change = TagBatchChange.new("aaa", "bbb", @user, "127.0.0.1")
tag_batch_change.perform
@post.reload
assert_equal("bbb", @post.tag_string)
end
should "raise an error if there is no predicate" do
tag_batch_change = TagBatchChange.new("", "bbb")
tag_batch_change = TagBatchChange.new("", "bbb", @user, "127.0.0.1")
assert_raises(TagBatchChange::Error) do
tag_batch_change.execute
tag_batch_change.perform
end
end
end