Skip to content

Commit

Permalink
Merge pull request #4 from rodrigo-medeiros/give_me_an_overview
Browse files Browse the repository at this point in the history
Changed 'total_quantity' to 'total_orders' to be compliant with the prob...
  • Loading branch information
mdunisch committed Aug 21, 2014
2 parents aa24cbb + 01960a5 commit 47b79ca
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions exercises/6_give_me_an_overview/exercise.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
]
};
Expand Down Expand Up @@ -67,7 +67,7 @@ var testing = {
shouldbe: [
{
"article": 1,
"total_quantity": 8
"total_orders": 8
}
]
},
Expand All @@ -85,7 +85,7 @@ var testing = {
shouldbe: [
{
"article": 1,
"total_quantity": 0
"total_orders": 0
}
]
}
Expand Down
6 changes: 3 additions & 3 deletions exercises/6_give_me_an_overview/solution/solution.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
module.exports = overview;

0 comments on commit 47b79ca

Please sign in to comment.