From 01960a5995a2ab6578d342429ab75fd0f3bbac2b Mon Sep 17 00:00:00 2001 From: Rodrigo Medeiros Date: Thu, 21 Aug 2014 15:40:30 -0300 Subject: [PATCH] Changed 'total_quantity' to 'total_orders' to be compliant with the problem description. --- exercises/6_give_me_an_overview/exercise.js | 10 +++++----- exercises/6_give_me_an_overview/solution/solution.js | 6 +++--- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/exercises/6_give_me_an_overview/exercise.js b/exercises/6_give_me_an_overview/exercise.js index a23bb23..bffa66b 100644 --- a/exercises/6_give_me_an_overview/exercise.js +++ b/exercises/6_give_me_an_overview/exercise.js @@ -30,15 +30,15 @@ var run = { expect: [ { "article": 2323, - "total_quantity": 14 + "total_orders": 14 }, { "article": 655, - "total_quantity": 6 + "total_orders": 6 }, { "article": 41, - "total_quantity": 1 + "total_orders": 1 } ] }; @@ -67,7 +67,7 @@ var testing = { shouldbe: [ { "article": 1, - "total_quantity": 8 + "total_orders": 8 } ] }, @@ -85,7 +85,7 @@ var testing = { shouldbe: [ { "article": 1, - "total_quantity": 0 + "total_orders": 0 } ] } diff --git a/exercises/6_give_me_an_overview/solution/solution.js b/exercises/6_give_me_an_overview/solution/solution.js index 7b26130..5cda6d4 100644 --- a/exercises/6_give_me_an_overview/solution/solution.js +++ b/exercises/6_give_me_an_overview/solution/solution.js @@ -26,15 +26,15 @@ var overview = function(orders) { overviewarray.push({ article: key, - total_quantity: total + total_orders: total }); }); // Order - overviewarray = _.sortBy(overviewarray, "total_quantity").reverse(); + overviewarray = _.sortBy(overviewarray, "total_orders").reverse(); return overviewarray; }; -module.exports = overview; \ No newline at end of file +module.exports = overview;