Permalink
Browse files

Sort articles by date for glog tests

  • Loading branch information...
1 parent c54a70e commit 749b5a91e9a0a4924fa68061c8de6a222f746db6 @wlaurance wlaurance committed Oct 22, 2012
Showing with 6 additions and 1 deletion.
  1. +3 −0 package.json
  2. +3 −1 test/glog_tests.js
View
@@ -12,6 +12,9 @@
"async": ">= 0.1.22",
"config": "~0.4.17"
},
+ "devDependencies": {
+ "underscore": "~1.4.2"
+ },
"scripts": {
"test": "make test"
}
View
@@ -1,5 +1,6 @@
var assert = require('assert'),
- exec = require('child_process').exec;
+ exec = require('child_process').exec,
+ _ = require('underscore');
describe('Glog', function() {
@@ -89,6 +90,7 @@ describe('Glog', function() {
glog.load_plugins(options, function(){
glog.load_articles(options, function(articles) {
glog.render_blog(options, articles, function() {
+ articles = _.sortBy(articles, 'date');
assert.equal(articles[0].show_on_home_page, false);
assert.equal(articles[1].show_on_home_page, true);
done();

0 comments on commit 749b5a9

Please sign in to comment.