From 85645cd672653cbc7b4fc3241c37ecb5a2c3c714 Mon Sep 17 00:00:00 2001 From: Mathieu N Date: Mon, 23 Nov 2015 19:06:18 -0500 Subject: [PATCH] remove old emails test #35 --- application/tests/controllers/Ajax_test.php | 42 ++++--------------- .../tests/controllers/Measures_test.php | 10 ++++- .../tests/controllers/Welcome_test.php | 0 application/tests/models/Measure_test.php | 10 ++++- application/tests/models/Watch_test.php | 10 ++++- 5 files changed, 36 insertions(+), 36 deletions(-) mode change 100755 => 100644 application/tests/controllers/Welcome_test.php diff --git a/application/tests/controllers/Ajax_test.php b/application/tests/controllers/Ajax_test.php index 9cf923ce..b1ff3cf3 100644 --- a/application/tests/controllers/Ajax_test.php +++ b/application/tests/controllers/Ajax_test.php @@ -7,6 +7,14 @@ class Ajax_test extends TestCase { public static function setUpBeforeClass() { $CI = &get_instance(); + $CI->emailWatch = new MY_Model('email_watch'); + $CI->emailMeasure = new MY_Model('email_measure'); + $CI->emailUser = new MY_Model('email_user'); + + $CI->emailUser->delete_where(array("id >=" => "0")); + $CI->emailWatch->delete_where(array("id >=" => "0")); + $CI->emailMeasure->delete_where(array("id >=" => "0")); + $CI->load->model('User'); $CI->load->model('Measure'); $CI->load->model('Watch'); @@ -29,14 +37,6 @@ public function test_checkEmail() { public function test_signup() { - $this->request->setCallable( - function ($CI) { - $email = $this->getDouble('CI_Email', ['send' => TRUE]); - $this->verifyInvokedOnce($email, 'send'); - $CI->email = $email; - } - ); - $output = $this->request( 'POST', ['Ajax', 'signup'], @@ -113,14 +113,6 @@ public function test_signupFail() { public function test_facebookSignup() { - $this->request->setCallable( - function ($CI) { - $email = $this->getDouble('CI_Email', ['send' => TRUE]); - $this->verifyInvokedOnce($email, 'send'); - $CI->email = $email; - } - ); - $output = $this->request( 'POST', ['Ajax', 'facebookSignup'], @@ -180,14 +172,6 @@ public function test_facebookSigninFalse() { public function test_askResetPassword() { - $this->request->setCallable( - function ($CI) { - $email = $this->getDouble('CI_Email', ['send' => TRUE]); - $this->verifyInvokedOnce($email, 'send'); - $CI->email = $email; - } - ); - $output = $this->request( 'POST', ['Ajax', 'askResetPassword'], @@ -271,14 +255,6 @@ public function test_baseMesure() { 014 ); - $this->request->setCallable( - function ($CI) { - $email = $this->getDouble('CI_Email', ['send' => TRUE]); - $this->verifyInvokedOnce($email, 'send'); - $CI->email = $email; - } - ); - $output = $this->request( 'POST', ['Ajax', 'baseMeasure'], @@ -336,4 +312,4 @@ function ($CI) { } -} \ No newline at end of file +} diff --git a/application/tests/controllers/Measures_test.php b/application/tests/controllers/Measures_test.php index 0c26c394..a4e84575 100644 --- a/application/tests/controllers/Measures_test.php +++ b/application/tests/controllers/Measures_test.php @@ -25,6 +25,14 @@ public static function setUpBeforeClass() { self::$userId = $CI->session->userdata('userId'); + $CI->emailWatch = new MY_Model('email_watch'); + $CI->emailMeasure = new MY_Model('email_measure'); + $CI->emailUser = new MY_Model('email_user'); + + $CI->emailUser->delete_where(array("id >=" => "0")); + $CI->emailWatch->delete_where(array("id >=" => "0")); + $CI->emailMeasure->delete_where(array("id >=" => "0")); + $CI->Watch->delete_where(array("watchId >=" => "0")); $CI->Measure->delete_where(array("id >=" => "0")); } @@ -109,4 +117,4 @@ public function test_getAccuracy(){ } -} \ No newline at end of file +} diff --git a/application/tests/controllers/Welcome_test.php b/application/tests/controllers/Welcome_test.php old mode 100755 new mode 100644 diff --git a/application/tests/models/Measure_test.php b/application/tests/models/Measure_test.php index 038dee65..b4e1366b 100644 --- a/application/tests/models/Measure_test.php +++ b/application/tests/models/Measure_test.php @@ -39,6 +39,14 @@ public static function setUpBeforeClass() { self::$watch = $CI->Watch->getWatch(self::$watchId); + $CI->emailWatch = new MY_Model('email_watch'); + $CI->emailMeasure = new MY_Model('email_measure'); + $CI->emailUser = new MY_Model('email_user'); + + $CI->emailUser->delete_where(array("id >=" => "0")); + $CI->emailWatch->delete_where(array("id >=" => "0")); + $CI->emailMeasure->delete_where(array("id >=" => "0")); + $CI->Measure->delete_where(array("id >=" => "0")); } @@ -256,4 +264,4 @@ public function test_getMeasuresCountByWatchBrand() { } -?> \ No newline at end of file +?> diff --git a/application/tests/models/Watch_test.php b/application/tests/models/Watch_test.php index 38517ca1..6d232e09 100644 --- a/application/tests/models/Watch_test.php +++ b/application/tests/models/Watch_test.php @@ -24,6 +24,14 @@ public static function setUpBeforeClass() { self::$userId = $CI->session->userdata('userId'); + $CI->emailWatch = new MY_Model('email_watch'); + $CI->emailMeasure = new MY_Model('email_measure'); + $CI->emailUser = new MY_Model('email_user'); + + $CI->emailUser->delete_where(array("id >=" => "0")); + $CI->emailWatch->delete_where(array("id >=" => "0")); + $CI->emailMeasure->delete_where(array("id >=" => "0")); + $CI->Watch->delete_where(array("watchId >=" => "0")); } @@ -109,4 +117,4 @@ public static function tearDownAfterClass() { } -?> \ No newline at end of file +?>