@@ -128,6 +128,9 @@ describe 'Transactions', ->
128128
129129 {labels , properties } = fixtures .createTestNode module , _
130130
131+ # Add a random property so it's easier to look for it below:
132+ properties .test = " should isolate effects #{ helpers .getRandomStr ()} "
133+
131134 [{node}] = tx .cypher
132135 query : """
133136 CREATE (node:#{ TEST_LABEL} {properties})
@@ -145,22 +148,12 @@ describe 'Transactions', ->
145148 results = DB .cypher
146149 query : """
147150 MATCH (node:#{ TEST_LABEL} )
148- WHERE #{ (
149- # NOTE: Cypher doesn’t support directly comparing nodes and
150- # property bags, so we have to compare each property.
151- # HACK: CoffeeLint thinks the below is bad indentation.
152- # https://github.com/clutchski/coffeelint/issues/456
153- # coffeelint: disable=indentation
154- for prop of properties
155- " node.#{ prop} = {properties}.#{ prop} "
156- # coffeelint: enable=indentation
157- # HACK: CoffeeLint also thinks the below is double quotes!
158- # https://github.com/clutchski/coffeelint/issues/368
159- # coffeelint: disable=no_unnecessary_double_quotes
160- ).join ' AND ' }
151+ // NOTE: Cypher doesn't support comparing a node or relationship
152+ // to an entire map of properties, so we check just the one
153+ // random one we created above:
154+ WHERE node.test = {properties}.test
161155 RETURN node
162156 """
163- # coffeelint: enable=no_unnecessary_double_quotes
164157 params : {properties}
165158 , _
166159
0 commit comments