Skip to content

Commit

Permalink
Added test to ensure inserting of embedded empty arrays works properly
Browse files Browse the repository at this point in the history
  • Loading branch information
LaravelFreelancerNL committed Apr 9, 2022
1 parent d0da439 commit 132c359
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Unit/AQL/StatementClausesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,18 @@ public function testInsertStatement()
self::assertEquals('INSERT @' . $result->getQueryId() . '_1 IN Characters', $result->query);
}

public function testInsertEmptyArrayStatement()
{
$result = (new QueryBuilder())->insert('{
"traits": []
}', 'Characters')->get();

self::assertEquals('{
"traits": []
}', $result->binds[$result->getQueryId() . '_1']);
}


public function testUpdateClause()
{
$result = (new QueryBuilder())
Expand Down

0 comments on commit 132c359

Please sign in to comment.