Displaying 1 result from an estimated 1 matches for "community_director".
2005 Dec 30
2
before_create question
...ode throws no exception:
event = TrainingEvent.new :start_date => 19.days.from_now,
:end_date => 22.days.from_now,
:capacity => 10
reg = Registration.create :training_event => event, :user => @bob,
:role => @community_director, :program_number => ''asdf''
assert_equal reg.errors.on(:base), ''Registration deadline has passed''
reg.save!
I''m asserting that errors exist, but save! doesn''t throw an exception.
But the registration doesn''t seem to be saved...