added unapproval+upload functional test

This commit is contained in:
albert
2011-01-31 18:01:48 -05:00
parent 28b42e791c
commit df20d9233b
13 changed files with 174 additions and 9 deletions

View File

@@ -3,4 +3,10 @@ class Unapproval < ActiveRecord::Base
belongs_to :unapprover, :class_name => "User"
validates_presence_of :reason, :unapprover_id, :unapprover_ip_addr
before_validation :initialize_unapprover, :on => :create
def initialize_unapprover
self.unapprover_id = CurrentUser.id
self.unapprover_ip_addr = CurrentUser.ip_addr
end
end