Skip to content

Commit 7c54779

Browse files
committed
adds the test that should succeed
1 parent 241af33 commit 7c54779

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/unit/firebase.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -546,6 +546,18 @@ describe('MockFirebase', function () {
546546
expect(ref.getData().some).to.eql({prop: 12});
547547
});
548548

549+
it('does override its paths with data', function () {
550+
ref.child('some').child('prop').set({foo: 1});
551+
ref.flush();
552+
553+
var update = {};
554+
update['some/prop'] = {bar: 2};
555+
ref.update(update);
556+
ref.flush();
557+
558+
expect(ref.getData().some.prop).to.eql({bar: 2});
559+
});
560+
549561
it('does not change unrelated data', function () {
550562
ref.child('some').child('prop').set(1);
551563
ref.child('some').child('other').child('prop').set(2);

0 commit comments

Comments
 (0)