@@ -75,7 +75,6 @@ describe('session', function() {
75
75
it ( 'should call observers onError on error ' , function ( done ) {
76
76
77
77
// When & Then
78
- var records = [ ] ;
79
78
session . run ( "RETURN 1 AS" ) . subscribe ( {
80
79
onError : function ( error ) {
81
80
expect ( error . fields . length ) . toBe ( 1 ) ;
@@ -131,7 +130,7 @@ describe('session', function() {
131
130
it ( 'should expose summarize method for basic metadata ' , function ( done ) {
132
131
// Given
133
132
var statement = "CREATE (n:Label {prop:{prop}}) RETURN n" ;
134
- var params = { prop : "string" }
133
+ var params = { prop : "string" } ;
135
134
// When & Then
136
135
session . run ( statement , params )
137
136
. then ( function ( result ) {
@@ -145,10 +144,22 @@ describe('session', function() {
145
144
} ) ;
146
145
} ) ;
147
146
147
+ it ( 'should expose empty parameter map on call with no parameters' , function ( done ) {
148
+ // Given
149
+ var statement = "CREATE (n:Label {prop:'string'}) RETURN n" ;
150
+ // When & Then
151
+ session . run ( statement )
152
+ . then ( function ( result ) {
153
+ var sum = result . summary ;
154
+ expect ( sum . statement . parameters ) . toEqual ( { } ) ;
155
+ done ( ) ;
156
+ } ) ;
157
+ } ) ;
158
+
148
159
it ( 'should expose plan ' , function ( done ) {
149
160
// Given
150
161
var statement = "EXPLAIN CREATE (n:Label {prop:{prop}}) RETURN n" ;
151
- var params = { prop : "string" }
162
+ var params = { prop : "string" } ;
152
163
// When & Then
153
164
session
154
165
. run ( statement , params )
@@ -167,7 +178,7 @@ describe('session', function() {
167
178
it ( 'should expose profile ' , function ( done ) {
168
179
// Given
169
180
var statement = "PROFILE MATCH (n:Label {prop:{prop}}) RETURN n" ;
170
- var params = { prop : "string" }
181
+ var params = { prop : "string" } ;
171
182
// When & Then
172
183
session
173
184
. run ( statement , params )
0 commit comments