Skip to content
Browse files

re-added tests for #795

  • Loading branch information...
1 parent c94d3bb commit abb1bf21792124fea5e0835aba5d05803d941e39 @jexp jexp committed Aug 22, 2012
Showing with 21 additions and 0 deletions.
  1. +21 −0 cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala
View
21 cypher/src/test/scala/org/neo4j/cypher/ExecutionEngineTest.scala
@@ -2119,6 +2119,27 @@ RETURN x0.name?
assert(result.toList === List(Map("sum(foo)" -> 8)))
}
+ @Test
+ def with_should_not_forget_parameters() {
+ graph.index().forNodes("test")
+ val id = "bar"
+ val result = parseAndExecute("start n=node:test(name={id}) with count(*) as c where c=0 create x={name:{id}} return c, x", "id" -> id).toList
+
+ assert(result.size === 1)
+ assert(result(0)("c").asInstanceOf[Long] === 0)
+ assert(result(0)("x").asInstanceOf[Node].getProperty("name") === id)
+ }
+
+ @Test
+ def with_should_not_forget_parameters2() {
+ val a = createNode()
+ val id = a.getId
+ val result = parseAndExecute("start n=node({id}) with n set n.foo={id} return n", "id" -> id).toList
+
+ assert(result.size === 1)
+ assert(result(0)("n").asInstanceOf[Node].getProperty("foo") === id)
+ }
+
@Ignore("This pattern is currently not supported. Revisit when we do support it.")
@Test
def two_double_optional_paths_with_shared_relationships() {

0 comments on commit abb1bf2

Please sign in to comment.
Something went wrong with that request. Please try again.