@@ -128,6 +128,9 @@ describe 'Transactions', ->
128
128
129
129
{labels , properties } = fixtures .createTestNode module , _
130
130
131
+ # Add a random property so it's easier to look for it below:
132
+ properties .test = " should isolate effects #{ helpers .getRandomStr ()} "
133
+
131
134
[{node}] = tx .cypher
132
135
query : """
133
136
CREATE (node:#{ TEST_LABEL} {properties})
@@ -145,22 +148,12 @@ describe 'Transactions', ->
145
148
results = DB .cypher
146
149
query : """
147
150
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
161
155
RETURN node
162
156
"""
163
- # coffeelint: enable=no_unnecessary_double_quotes
164
157
params : {properties}
165
158
, _
166
159
0 commit comments