CC-5651: Unit Test the Scheduler
Added test for deleting an entire repeating show
This commit is contained in:
parent
59f0e63763
commit
005d4b9b6d
2 changed files with 45 additions and 0 deletions
|
@ -248,4 +248,32 @@ class ShowTest extends Zend_Test_PHPUnit_DatabaseTestCase
|
|||
$ds
|
||||
);
|
||||
}
|
||||
|
||||
/* Tests the entire show gets deleted when the user selects 'Delete this
|
||||
* instance and all following' from the context menu on the calendar
|
||||
*/
|
||||
public function testDeleteRepeatingShow()
|
||||
{
|
||||
TestHelper::loginUser();
|
||||
|
||||
$data = ShowData::getWeeklyRepeatNoEndNoRRData();
|
||||
$showService = new Application_Service_ShowService(null, $data);
|
||||
|
||||
$showService->addUpdateShow($data);
|
||||
$showService->deleteShow(1);
|
||||
|
||||
$ds = new Zend_Test_PHPUnit_Db_DataSet_QueryDataSet(
|
||||
$this->getConnection()
|
||||
);
|
||||
$ds->addTable('cc_show', 'select * from cc_show');
|
||||
$ds->addTable('cc_show_days', 'select * from cc_show_days');
|
||||
$ds->addTable('cc_show_instances', 'select id, starts, ends, show_id, record, rebroadcast, instance_id, modified_instance from cc_show_instances order by id');
|
||||
$ds->addTable('cc_show_rebroadcast', 'select * from cc_show_rebroadcast');
|
||||
$ds->addTable('cc_show_hosts', 'select * from cc_show_hosts');
|
||||
|
||||
$this->assertDataSetsEqual(
|
||||
$this->createXmlDataSet(dirname(__FILE__)."/files/test_deleteRepeatingShow.xml"),
|
||||
$ds
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue