@@ -111,6 +111,8 @@ mod tests {
111111 use crate :: commands:: local_db:: sqlite:: sqlite_execute;
112112 use crate :: commands:: local_db:: sync:: storage:: DEFAULT_SCHEMA_SQL ;
113113
114+ const RAW_SQL_STUB : & str = "INSERT INTO raw_events (block_number, block_timestamp, transaction_hash, log_index, address, topics, data, raw_json) VALUES (0, NULL, '0x0', 0, '0x0', '[]', '0x', '{}');\n " ;
115+
114116 struct MockDataSource {
115117 sql_result : String ,
116118 rpc_urls : Vec < Url > ,
@@ -258,7 +260,7 @@ mod tests {
258260 captured_prefixes : Mutex :: new ( vec ! [ ] ) ,
259261 captured_events : Mutex :: new ( vec ! [ ] ) ,
260262 captured_decimals : Mutex :: new ( vec ! [ ] ) ,
261- raw_sql : "RAW_PREFIX; \n " . to_string ( ) ,
263+ raw_sql : RAW_SQL_STUB . to_string ( ) ,
262264 captured_raw : Mutex :: new ( vec ! [ ] ) ,
263265 } ;
264266
@@ -279,7 +281,7 @@ mod tests {
279281 assert ! ( result. contains( "INSERT INTO sync" ) ) ;
280282 let prefixes = data_source. captured_prefixes . lock ( ) . unwrap ( ) ;
281283 assert_eq ! ( prefixes. len( ) , 1 ) ;
282- assert ! ( prefixes[ 0 ] . starts_with( "RAW_PREFIX; " ) ) ;
284+ assert ! ( prefixes[ 0 ] . starts_with( "INSERT INTO raw_events " ) ) ;
283285 let raw = data_source. captured_raw . lock ( ) . unwrap ( ) ;
284286 assert_eq ! ( raw. len( ) , 1 ) ;
285287 assert ! ( raw[ 0 ] . is_empty( ) ) ;
@@ -323,7 +325,7 @@ mod tests {
323325 captured_prefixes : Mutex :: new ( Vec :: new ( ) ) ,
324326 captured_events : Mutex :: new ( Vec :: new ( ) ) ,
325327 captured_decimals : Mutex :: new ( Vec :: new ( ) ) ,
326- raw_sql : "RAW; \n " . into ( ) ,
328+ raw_sql : RAW_SQL_STUB . into ( ) ,
327329 captured_raw : Mutex :: new ( Vec :: new ( ) ) ,
328330 } ;
329331
@@ -357,7 +359,7 @@ mod tests {
357359
358360 let prefixes = data_source. captured_prefixes . lock ( ) . unwrap ( ) ;
359361 assert_eq ! ( prefixes. len( ) , 1 ) ;
360- assert ! ( prefixes[ 0 ] . starts_with( "RAW; \n " ) ) ;
362+ assert ! ( prefixes[ 0 ] . starts_with( "INSERT INTO raw_events " ) ) ;
361363
362364 let captured_events = data_source. captured_events . lock ( ) . unwrap ( ) ;
363365 assert_eq ! ( captured_events. len( ) , 1 ) ;
0 commit comments