Skip to content

Commit

Permalink
refactor test to run again
Browse files Browse the repository at this point in the history
  • Loading branch information
evaletolab committed Jan 23, 2017
1 parent adeb5bd commit ec184e9
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions test/order.validate.report.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,15 +130,15 @@ describe("orders.validate.report", function(){
it("validate report content with the new API 2.0 for Year", function(done){
var month=criteria.from.getMonth()+1, year=criteria.from.getFullYear();
Orders.getCAByVendor({year:year,grouped:true},function (err,report) {
should.not.exist(report.shops['mon-shop'].products);
should.not.exist(report.shops['un-autre-shop'].products);

report.shops['mon-shop'].items.should.equal(2);
report.shops['mon-shop'].amount.should.equal(5);
report.shops['mon-shop'].orders.length.should.equal(2);
report.shops['mon-shop'].fees.should.equal(1.13);
report.shops['mon-shop'].contractFees.sort()[0].should.equal(0.15);
report.shops['mon-shop'].contractFees.sort()[1].should.equal(0.3);
report.shops['mon-shop'].products.length.should.equal(1);
report.shops['mon-shop'].products[0].count.should.equal(1);
report.shops['mon-shop'].products[0].amount.should.equal(2.5);

report.shops['super-shop'].items.should.equal(3);
report.shops['super-shop'].amount.should.equal(10);
Expand All @@ -151,7 +151,6 @@ describe("orders.validate.report", function(){
report.shops['un-autre-shop'].orders.length.should.equal(4);
report.shops['un-autre-shop'].fees.should.equal(7.78);
report.shops['un-autre-shop'].contractFees[0].should.equal(0.14);
report.shops['un-autre-shop'].products.length.should.equal(7);
report.amount.should.equal(70.6);
report.ca.should.equal(10.51);
report.items.should.equal(22);
Expand Down

0 comments on commit ec184e9

Please sign in to comment.