Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
bh2smith committed Sep 18, 2023
1 parent f0ba039 commit f27cdec
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions src/database/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,21 +544,26 @@ event Event (

#[ignore]
#[tokio::test]
async fn boolean_fields() {
async fn boolean_and_text_fields() {
clear_database().await;
let mut db = Postgres::connect(&local_postgres_url()).await.unwrap();
let event = r#"
event Event (
bool,
bool
bool,
string
)
"#;
let event = EventDescriptor::parse_declaration(event).unwrap();
db.prepare_event("event", &event).await.unwrap();
let log = Log {
event: "event",
block_number: 0,
fields: vec![AbiValue::Bool(true), AbiValue::Bool(false)],
fields: vec![
AbiValue::Bool(true),
AbiValue::Bool(false),
AbiValue::String("hello".to_string()),
],
..Default::default()
};
db.update(&[], &[log]).await.unwrap();
Expand Down

0 comments on commit f27cdec

Please sign in to comment.