Skip to content

Commit fc1145f

Browse files
committed
changed constraint syntax
1 parent 9660b14 commit fc1145f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

core/src/test/java/apoc/export/csv/ImportCsvTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@
4949
import static org.junit.Assert.assertFalse;
5050
import static org.junit.Assert.assertNull;
5151
import static org.junit.Assert.assertThat;
52+
import static org.junit.Assert.fail;
5253

5354
public class ImportCsvTest {
5455
public static final String BASE_URL_FILES = "src/test/resources/csv-inputs";
@@ -221,7 +222,7 @@ private void testSkipLine(long skipLine, int nodes) {
221222
@Test
222223
public void issue2826WithImportCsv() {
223224
db.executeTransactionally("CREATE (n:Person {name: 'John'})");
224-
db.executeTransactionally("CREATE CONSTRAINT unique_person ON (n:Person) ASSERT n.name IS UNIQUE");
225+
db.executeTransactionally("CREATE CONSTRAINT unique_person FOR (n:Person) REQUIRE n.name IS UNIQUE");
225226
try {
226227
TestUtil.testCall(db,
227228
"CALL apoc.import.csv([{fileName: $file, labels: ['Person']}], [], $config)",

core/src/test/java/apoc/export/graphml/ExportGraphMLTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -347,7 +347,7 @@ public void testImportGraphMLWithEdgeWithoutDataKeys() throws Exception {
347347
@Test
348348
public void issue2797WithImportGraphMl() {
349349
db.executeTransactionally("CREATE (n:FOO {name: 'foo'})");
350-
db.executeTransactionally("CREATE CONSTRAINT unique_foo ON (n:FOO) ASSERT n.name IS UNIQUE");
350+
db.executeTransactionally("CREATE CONSTRAINT unique_foo FOR (n:FOO) REQUIRE n.name IS UNIQUE");
351351
try {
352352
TestUtil.testCall(db,
353353
"CALL apoc.import.graphml($file, {readLabels:true})",

0 commit comments

Comments
 (0)