Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
mod max_integer; | ||
mod prisma_10098; | ||
mod prisma_13097; | ||
mod prisma_10935; | ||
mod prisma_12929; | ||
mod prisma_14696; | ||
|
34 changes: 34 additions & 0 deletions
34
query-engine/connector-test-kit-rs/query-engine-tests/tests/new/regressions/prisma_13097.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
use query_engine_tests::*; | ||
|
||
#[test_suite(schema(schema), only(Postgres))] | ||
mod prisma_13097 { | ||
fn schema() -> String { | ||
r#" | ||
enum AppCategories { | ||
calendar | ||
messaging | ||
payment | ||
other | ||
} | ||
model App { | ||
slug String @id @unique | ||
categories AppCategories[] | ||
createdAt DateTime @default(now()) | ||
updatedAt DateTime @updatedAt | ||
} | ||
"# | ||
.to_owned() | ||
} | ||
|
||
#[connector_test] | ||
async fn group_by_enum_array(runner: Runner) -> TestResult<()> { | ||
// Insert some data first | ||
run_query!(runner, r#"mutation { createManyApp(data: [{slug:"a",categories:[calendar,other]},{slug:"b",categories:[]},{slug:"c",categories:[calendar,other]},{slug:"d",categories:[messaging, payment]}]) { count } }"#); | ||
|
||
let result = run_query!(runner, r#"{groupByApp(by: [categories, slug]) { slug categories }}"#); | ||
assert_eq!(result, "meow"); | ||
|
||
Ok(()) | ||
} | ||
} |