File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 19
19
*/
20
20
"use strict" ;
21
21
22
+ var udebug = unified_debug . getLogger ( "test/t_basic/DefaultValuesTest.js" ) ;
23
+
22
24
/***** Persist with domain object ***/
23
25
var t1 = new harness . SerialTest ( "testPersistDomainObjectDefaultNameAndAge" ) ;
24
26
t1 . run = function ( ) {
@@ -157,6 +159,8 @@ t6.run = function() {
157
159
session . persist ( object , function ( err , session2 ) {
158
160
if ( ! err ) {
159
161
testCase . appendErrorMessage ( 't6 Expected error not received for not null no default undefined' ) ;
162
+ } else {
163
+ udebug . log ( 't6 Expected error received:' , err ) ;
160
164
}
161
165
testCase . failOnError ( ) ;
162
166
} , session ) ;
@@ -167,13 +171,16 @@ t6.run = function() {
167
171
var t7 = new harness . SerialTest ( "testPersistDomainObjectNotNullNoDefaultNull" ) ;
168
172
t7 . run = function ( ) {
169
173
var testCase = this ;
170
- // create the domain object 4176 with no magic; must fail
174
+ // create the domain object 4176 with magic null ; must fail
171
175
var object = new global . t_basic ( 4176 ) ;
172
176
object . magic = null ;
173
177
fail_openSession ( testCase , function ( session ) {
174
178
session . persist ( object , function ( err , session2 ) {
175
179
if ( ! err ) {
176
- testCase . appendErrorMessage ( 't6 Expected error not received for not null no default null' ) ;
180
+ testCase . appendErrorMessage ( 't7 Expected error not received for not null no default null' ) ;
181
+ } else {
182
+ testCase . errorIfNotEqual ( 't7 Wrong sqlstate' , '23000' , err . sqlstate ) ;
183
+ udebug . log ( 't7 Expected error received:' , err ) ;
177
184
}
178
185
testCase . failOnError ( ) ;
179
186
} , session ) ;
You can’t perform that action at this time.
0 commit comments