File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1180,10 +1180,13 @@ async fn it_handles_prepared_statement_with_wrong_parameter_count() -> anyhow::R
11801180 let Err ( sqlx_oldapi:: Error :: Database ( err) ) = result else {
11811181 panic ! ( "should be an error, got {:?}" , result) ;
11821182 } ;
1183+ let err_str = err. to_string ( ) . to_lowercase ( ) ;
11831184 // https://learn.microsoft.com/en-us/sql/odbc/reference/appendixes/appendix-a-odbc-error-codes?view=sql-server-ver17
11841185 // 07002 -> COUNT field incorrect
11851186 assert ! (
1186- err. to_string( ) . contains( "07002" ) ,
1187+ err_str. contains( "07002" )
1188+ || err_str. contains( "parameter count" )
1189+ || err_str. contains( "unbound parameter" ) ,
11871190 "{:?} should contain '07002' (COUNT field incorrect)" ,
11881191 err
11891192 ) ;
You can’t perform that action at this time.
0 commit comments