Permalink
Browse files

Updated the Mssql tests with fixes of insertMulti.

  • Loading branch information...
1 parent f0db55d commit 195653bdfcb6df3b7bc846d0f298515949691a6b @jrbasso jrbasso committed May 22, 2011
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/Cake/Test/Case/Model/Datasource/Database/MssqlTest.php
@@ -557,6 +557,8 @@ public function testInsertMulti() {
$result = $this->db->simulated;
$expected = array(
'SET IDENTITY_INSERT [mssql_test_models] ON',
+ "INSERT INTO [mssql_test_models] ([id], [name], [login]) VALUES (1, 'Larry', 'PhpNut')",
+ "INSERT INTO [mssql_test_models] ([id], [name], [login]) VALUES (2, 'Renan', 'renan.saddam')",
'SET IDENTITY_INSERT [mssql_test_models] OFF'
);
$this->assertEqual($expected, $result);
@@ -568,7 +570,10 @@ public function testInsertMulti() {
$this->db->simulated = array();
$this->db->insertMulti($this->model, $fields, $values);
$result = $this->db->simulated;
- $expected = array();
+ $expected = array(
+ "INSERT INTO [mssql_test_models] ([name], [login]) VALUES ('Larry', 'PhpNut')",
+ "INSERT INTO [mssql_test_models] ([name], [login]) VALUES ('Renan', 'renan.saddam')",
+ );
$this->assertEqual($expected, $result);
}
}

0 comments on commit 195653b

Please sign in to comment.