* Add unit test for isclickable.
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
/**
|
||||
|
||||
title=测试 mailModel->isClickable();
|
||||
cid=0
|
||||
|
||||
- 不传入method参数 @0
|
||||
- 传入method=delete参数 @1
|
||||
- 传入method=resend参数 @0
|
||||
- 传入method=resend参数, item的status字段为fail @1
|
||||
|
||||
*/
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
su('admin');
|
||||
|
||||
zdTable('notify')->gen(2);
|
||||
|
||||
global $tester;
|
||||
$mailModel = $tester->loadModel('mail');
|
||||
$mailModel->app->user->admin = true;
|
||||
|
||||
$notify = $mailModel->getQueueById(1);
|
||||
|
||||
r($mailModel->isClickable($notify, '')) && p() && e('0'); //不传入method参数
|
||||
r($mailModel->isClickable($notify, 'delete')) && p() && e('1'); //传入method=delete参数
|
||||
r($mailModel->isClickable($notify, 'resend')) && p() && e('0'); //传入method=resend参数
|
||||
|
||||
$notify->status = 'fail';
|
||||
r($mailModel->isClickable($notify, 'resend')) && p() && e('1'); //传入method=resend参数, item的status字段为fail
|
||||
@@ -4,10 +4,12 @@
|
||||
/**
|
||||
|
||||
title=测试 mailModel->sendmail();
|
||||
cid=1
|
||||
pid=1
|
||||
cid=0
|
||||
|
||||
测试为dev4用户发送邮件通知 >> 0
|
||||
- 不传入任何参数 @0
|
||||
- 只传入actionID @0
|
||||
- 只传入objectID @0
|
||||
- 测试为需求2发送邮件通知 @0
|
||||
|
||||
*/
|
||||
include dirname(__FILE__, 5) . '/test/lib/init.php';
|
||||
|
||||
Reference in New Issue
Block a user