Skip to content

Commit 9a9935d

Browse files
committed
Failing test for soumak77#110
1 parent b683ee4 commit 9a9935d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/unit/firebase.js

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

549+
it('can work with nested paths beginning with /', function () {
550+
var update = {};
551+
update['some/prop/withoutSlash'] = 12;
552+
update['/some/prop/withSlash'] = 12;
553+
ref.update(update);
554+
ref.flush();
555+
expect(ref.getData().some.prop).to.eql({withoutSlash: 12, withSlash: 12});
556+
});
557+
549558
it('overrides the paths with existing data', function () {
550559
ref.child('some').child('prop').set({foo: 1});
551560
ref.flush();

0 commit comments

Comments
 (0)