diff --git a/application/third_party/CIUnit/libraries/Fixture.php b/application/third_party/CIUnit/libraries/Fixture.php index 47449e0..a504dd9 100755 --- a/application/third_party/CIUnit/libraries/Fixture.php +++ b/application/third_party/CIUnit/libraries/Fixture.php @@ -48,8 +48,8 @@ class Fixture { { $this->_assign_db(); - $Q = TRUE; - //$Q = $this->CI->db->simple_query('truncate table ' . $table . ';'); + //$Q = TRUE; + $Q = $this->CI->db->simple_query('TRUNCATE TABLE ' . $table . ' CASCADE;'); if (!$Q) { echo $this->CI->db->call_function('error', $this->CI->db->conn_id); diff --git a/tests/models/FriendModelTest.php b/tests/models/FriendModelTest.php index df6864e..03dc14c 100755 --- a/tests/models/FriendModelTest.php +++ b/tests/models/FriendModelTest.php @@ -4,6 +4,8 @@ class FriendModelTest extends Todo_TestCase { protected $tables = array( 'todo_status' => 'todo_status', + 'todo_priority' => 'todo_priority', + 'todo_user' => 'todo_user', 'todo_group' => 'todo_group', 'todo_category' => 'todo_category', 'todo_item' => 'todo_item', @@ -16,13 +18,6 @@ class FriendModelTest extends Todo_TestCase { parent::setUp(); $this->CI->load->model('friend_model'); $this->create_session(); - // Reset database data for each test - $this->dbfixt( - 'todo_user', - 'todo_group', - 'todo_group_users_link', - 'todo_user_friend_link' - ); } public function testGetFriends() diff --git a/tests/models/TaskModelTest.php b/tests/models/TaskModelTest.php index 5934baa..c92a41e 100755 --- a/tests/models/TaskModelTest.php +++ b/tests/models/TaskModelTest.php @@ -9,7 +9,9 @@ class TaskModelTest extends Todo_TestCase { */ protected $tables = array( 'todo_group' => 'todo_group', + 'todo_status' => 'todo_status', 'todo_category' => 'todo_category', + 'todo_priority' => 'todo_priority', 'todo_user' => 'todo_user', 'todo_item' => 'todo_item', 'todo_checklist' => 'todo_checklist', @@ -18,7 +20,6 @@ class TaskModelTest extends Todo_TestCase { 'todo_group_task_link' => 'todo_group_task_link', 'todo_user_task_link' => 'todo_user_task_link', 'todo_reminder' => 'todo_reminder', - ); public function setUp()