Changeset 227b6ba in iPeer


Ignore:
Timestamp:
2013-08-07T12:06:16-07:00 (4 years ago)
Author:
mwytang <michael.tang@…>
Branches:
3.1.x, dev, master
Children:
8f75a27
Parents:
562f7e2
Message:

Fixed tests broken from last commit

With the new event added to the sample data, some tests are broken
due to difference in number of events.
ease enter the commit message for your changes. Lines starting

Location:
app
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • app/config/sql/ipeer_samples_data.sql

    r562f7e2 r227b6ba  
    334334
    335335INSERT INTO `email_schedules` (`id`, `subject`, `content`, `date`, `from`, `to`, `course_id`, `event_id`, `grp_id`, `sent`, `creator_id`, `created`) VALUES
    336 (1, 'Email Template', 'Hello, {{{FIRSTNAME}}}', '2013-07-18 16:52:31', '1', '5;6;7;13;15;17;19;21;26;28;31;32;33', NULL, NULL, NULL, 0, 1, '2012-07-16 16:52:50'),
     336(1, 'Email Template', 'Hello, {{{FIRSTNAME}}}', CONCAT(YEAR(DATE_ADD(NOW(), INTERVAL 1 YEAR)), '-07-18 16:52:31'), '1', '5;6;7;13;15;17;19;21;26;28;31;32;33', NULL, NULL, NULL, 0, 1, '2012-07-16 16:52:50'),
    337337(2, 'Email Template', 'Hello, {{{USERNAME}}}', '2011-07-18 16:52:31', '1', '5;6;7;13;15;17;19;21;26;28;31;32;33', NULL, NULL, NULL, 0, 1, '2010-07-16 16:57:50'),
    338338(3, 'Email Template', 'Hi, {{{USERNAME}}}', '2011-07-18 17:52:31', '1', '5;6;7;13;15;17;19;21;26;28;31;32;33', NULL, NULL, NULL, 1, 1, '2010-07-16 16:57:50');
  • app/tests/cases/controllers/courses_controller.test.php

    r562f7e2 r227b6ba  
    339339        $this->assertEqual($result['data']['Course']['title'], $this->fixtureView['Course'][0]['title']);
    340340        $this->assertEqual($result['groupCount'], 2);
    341         $this->assertEqual($result['eventCount'], 9);
     341        $this->assertEqual($result['eventCount'], 10);
    342342        $this->assertEqual($result['title_for_layout'], $this->fixtureView['Course'][0]['course'].' - '.$this->fixtureView['Course'][0]['title']);
    343343    }
  • app/tests/cases/controllers/events_controller.test.php

    r562f7e2 r227b6ba  
    8484
    8585        $this->assertEqual(count($result["paramsForList"]['data']['entries']),
    86             9);
     86            10);
    8787        $this->assertEqual(sort(Set::extract($result["paramsForList"]['data']['entries'], '/Event/id')), array(1,2,3,6));
    8888        $events = Set::sort($result["paramsForList"]['data']['entries'], '{n}.Event.id', 'asc');
  • app/tests/cases/models/event.test.php

    r562f7e2 r227b6ba  
    9090        //Test a valid course number
    9191        $course = $this->Event->getCourseEventCount(1);
    92         $this->assertEqual($course, 9);
     92        $this->assertEqual($course, 10);
    9393
    9494        //Test an invalid course number
     
    280280        $events = $this->Event->getEventsByUserId(5);
    281281        $evaluations = $events['Evaluations'];
    282         $this->assertEqual(count($evaluations), 7);
     282        $this->assertEqual(count($evaluations), 8);
    283283        $surveys = $events['Surveys'];
    284284        $this->assertEqual(count($surveys), 2);
     
    294294        $events = $this->Event->getEventsByUserId(5, array('id', 'title'));
    295295        $evaluations = $events['Evaluations'];
    296         $this->assertEqual(count($evaluations), 7);
     296        $this->assertEqual(count($evaluations), 8);
    297297        $surveys = $events['Surveys'];
    298298        $this->assertEqual(count($surveys), 2);
     
    301301        $events = $this->Event->getEventsByUserId(7);
    302302        $evaluations = $events['Evaluations'];
    303         $this->assertEqual(count($evaluations), 11);
     303        $this->assertEqual(count($evaluations), 12);
    304304        $surveys = $events['Surveys'];
    305305        $this->assertEqual(count($surveys), 2);
Note: See TracChangeset for help on using the changeset viewer.