Skip to content

Commit

Permalink
missed change in merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Druue committed Mar 14, 2023
1 parent 9a5e64d commit 3e97ef0
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion prisma-fmt/src/validate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,10 +120,15 @@ mod tests {
}
"#;

let request = json!({
"prismaSchema": schema,
});

let expected = expect![[
r#"{"error_code":"P1012","message":"\u001b[1;91merror\u001b[0m: \u001b[1mThe `referentialIntegrity` and `relationMode` attributes cannot be used together. Please use only `relationMode` instead.\u001b[0m\n \u001b[1;94m-->\u001b[0m \u001b[4mschema.prisma:6\u001b[0m\n\u001b[1;94m | \u001b[0m\n\u001b[1;94m 5 | \u001b[0m relationMode = \"prisma\"\n\u001b[1;94m 6 | \u001b[0m \u001b[1;91mreferentialIntegrity = \"foreignKeys\"\u001b[0m\n\u001b[1;94m | \u001b[0m\n\nValidation Error Count: 1"}"#
]];
let response = run(schema).unwrap_err();

let response = validate(&request.to_string()).unwrap_err();
expected.assert_eq(&response);
}
}

0 comments on commit 3e97ef0

Please sign in to comment.