Skip to content

Commit f45f6e3

Browse files
authored
Added unit test for .push()
1 parent abc654d commit f45f6e3

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/unit/firebase.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,14 @@ describe('MockFirebase', function () {
886886
}, done);
887887
ref.flush();
888888
});
889+
890+
it('should return thenable reference when no arguments are passed', function (done) {
891+
var thenable = ref.push();
892+
thenable.then(function(child) {
893+
expect(child.parent).to.eql(ref);
894+
done();
895+
}, done);
896+
});
889897

890898
it('can add data by auto id', function () {
891899
var id = ref._newAutoId();

0 commit comments

Comments
 (0)