File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 7777 "char_c" : {
7878 ".priority" : " c" ,
7979 "aLetter" : " c"
80+ },
81+ "zbool_true" : {
82+ "aBoolean" : true
83+ },
84+ "zbool_false" : {
85+ "aBoolean" : false
8086 }
8187 },
8288 "collections" : {
Original file line number Diff line number Diff line change @@ -146,6 +146,16 @@ describe('MockQuery', function () {
146146 expect ( spy . called ) . to . equal ( true ) ;
147147 } ) ;
148148
149+ it ( 'should work with boolean equalTo' , function ( ) {
150+ var spy = sinon . spy ( function ( snap ) {
151+ expect ( _ . keys ( snap . val ( ) ) ) . eql ( [ 'zbool_true' ] ) ;
152+ } ) ;
153+
154+ ref . limitToLast ( 2 ) . equalTo ( true ) . on ( 'value' , spy ) ;
155+ ref . flush ( ) ;
156+ expect ( spy ) . callCount ( 1 ) ;
157+ } ) ;
158+
149159 it ( 'should return null if not equalTo' , function ( ) {
150160 var spy = sinon . spy ( function ( snap ) {
151161 expect ( snap . val ( ) ) . equals ( null ) ;
@@ -345,8 +355,4 @@ describe('MockQuery', function () {
345355
346356 it ( 'should start at the key+priority given' ) ;
347357 } ) ;
348-
349- describe ( 'equalTo' , function ( ) {
350- it ( 'should start and stop at the key given' ) ;
351- } ) ;
352358} ) ;
You can’t perform that action at this time.
0 commit comments