Permalink
Browse files

add test to updateByJson

  • Loading branch information...
mapleincode committed Jan 5, 2016
1 parent 1c19aa6 commit c0f2a291661f4c89227ac5f63e20bff1eaef9e0a
Showing with 9 additions and 1 deletion.
  1. +9 −1 test/yukari.js
@@ -82,13 +82,21 @@ describe("yukari", function () {
done();
}).catch(done);
});
it("#update without change", function(done) {
it("#update without change", function (done) {
yukari.update(function(err, data) {
should.ifError(err);
data.should.be.eql(yukari);
done();
});
});
it("update by jsonData", function (done) {
yukari.updateByJson({key2: 5}, function(err, data) {
should.ifError(err);
data.should.be.eql(yukari);
yukari.key2.should.be.eql(5);
done();
});
});
it("#save",function (done){
yukari.key2 = 4;
yukari.save().$promise.then(function (data) {

0 comments on commit c0f2a29

Please sign in to comment.