Skip to content

Commit

Permalink
add test to updateByJson
Browse files Browse the repository at this point in the history
  • Loading branch information
mapleincode committed Jan 5, 2016
1 parent 1c19aa6 commit c0f2a29
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion test/yukari.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c0f2a29

Please sign in to comment.