# Copyright (c) 2010 bivio Software, Inc. All Rights Reserved. # # Visit http://www.bivio.biz for more info. # # This library is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Foundation; either version 2.1 of the # License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; If not, you may get a copy from: # http://www.opensource.org/licenses/lgpl-license.html # # $Id: CRMForm3.bunit,v 2.2 2010/11/17 22:35:53 schellj Exp $ FormModel(); req()->set_realm_and_user(qw(crm_forum crm_tech1)) ->initialize_fully('FORUM_CRM_FORM'); my($cal) = model('CRMActionList')->load_all; [ inline_case(sub { b_use('Model.User')->new(req())->unauth_load_or_die({ user_id => req('auth_user_id'), })->invalidate_email; }), empty_case({}), [{ action_id => $cal->id_to_name(-CRMThreadStatus('OPEN')->as_int), to => EmailArray(email('demo')), subject => 's1', body => 'b1', }], => [{}], inline_case(sub { die() unless req('Model.CRMForm')->get_field_error('from_email') ->eq_invalid_sender; }), ];