@@ -75,7 +75,6 @@ describe('session', function() {
7575 it ( 'should call observers onError on error ' , function ( done ) {
7676
7777 // When & Then
78- var records = [ ] ;
7978 session . run ( "RETURN 1 AS" ) . subscribe ( {
8079 onError : function ( error ) {
8180 expect ( error . fields . length ) . toBe ( 1 ) ;
@@ -131,7 +130,7 @@ describe('session', function() {
131130 it ( 'should expose summarize method for basic metadata ' , function ( done ) {
132131 // Given
133132 var statement = "CREATE (n:Label {prop:{prop}}) RETURN n" ;
134- var params = { prop : "string" }
133+ var params = { prop : "string" } ;
135134 // When & Then
136135 session . run ( statement , params )
137136 . then ( function ( result ) {
@@ -145,10 +144,22 @@ describe('session', function() {
145144 } ) ;
146145 } ) ;
147146
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+
148159 it ( 'should expose plan ' , function ( done ) {
149160 // Given
150161 var statement = "EXPLAIN CREATE (n:Label {prop:{prop}}) RETURN n" ;
151- var params = { prop : "string" }
162+ var params = { prop : "string" } ;
152163 // When & Then
153164 session
154165 . run ( statement , params )
@@ -167,7 +178,7 @@ describe('session', function() {
167178 it ( 'should expose profile ' , function ( done ) {
168179 // Given
169180 var statement = "PROFILE MATCH (n:Label {prop:{prop}}) RETURN n" ;
170- var params = { prop : "string" }
181+ var params = { prop : "string" } ;
171182 // When & Then
172183 session
173184 . run ( statement , params )
0 commit comments