Skip to content
This repository was archived by the owner on Mar 17, 2025. It is now read-only.

Commit fd4409f

Browse files
committed
Add utils.updateRec test.
Hoped it was the source of #541. It's not.
1 parent 7bf70bc commit fd4409f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/unit/utils.spec.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,12 @@ describe('$firebaseUtils', function () {
102102
$utils.updateRec(rec, testutils.snap({bar: 'baz', baz: 'foo'}));
103103
expect(rec).toEqual({bar: 'baz', baz: 'foo', $id: 'foo', $priority: null})
104104
});
105+
106+
it('should delete $value property if not a primitive',function(){
107+
var rec = {$id:'foo', $priority:null, $value:null };
108+
$utils.updateRec(rec, testutils.snap({bar: 'baz', baz:'foo'}));
109+
expect(rec).toEqual({bar: 'baz', baz: 'foo', $id: 'foo', $priority: null});
110+
});
105111
});
106112

107113
describe('#applyDefaults', function() {

0 commit comments

Comments
 (0)