fixed unit tests

This commit is contained in:
albert
2011-03-30 15:11:22 -04:00
parent f749e82da9
commit aee5cf0aa1
7 changed files with 41 additions and 27 deletions

View File

@@ -220,7 +220,7 @@ class Post < ActiveRecord::Base
end
def flag!(reason)
flag = create_flag(:reason => reason)
flag = flags.create(:reason => reason)
if flag.errors.any?
raise PostFlag::Error.new(flag.errors.full_messages.join("; "))
@@ -230,7 +230,7 @@ class Post < ActiveRecord::Base
end
def appeal!(reason)
appeal = create_appeal(:reason => reason)
appeal = appeals.create(:reason => reason)
if appeal.errors.any?
raise PostAppeal::Error.new(appeal.errors.full_messages.join("; "))