Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Commit

Permalink
Fix pagination path issue in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ducksoupdev committed Feb 26, 2015
1 parent a83052a commit a1d9e63
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion gulp/lib/compile-dates.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
templateData.totalPages = totalPages;
}

promises.push(new Promise(function (resolve, reject) {
promises.unshift(new Promise(function (resolve, reject) {
gulp.src(rootPath + '/src/templates/index.hbs')
.pipe(compileHandlebars(templateData, compileOptionsObj))
.pipe(rename('index.html'))
Expand Down
2 changes: 1 addition & 1 deletion gulp/lib/compile-home.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
templateData.totalPages = totalPages;
}

promises.push(new Promise(function(resolve, reject) {
promises.unshift(new Promise(function(resolve, reject) {
gulp.src(rootPath + '/src/templates/index.hbs')
.pipe(compileHandlebars(templateData, compileOptionsObj))
.pipe(rename('index.html'))
Expand Down
4 changes: 2 additions & 2 deletions gulp/tests/compile-home.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,11 +139,11 @@
});

it('Should have the correct home page content for the second paginated page', function () {
expect(fs.readFileSync(rootPath + '/build/page/2/index.html', 'utf8')).to.equal('<div><ul><li><a href="./test-post3/">Test post 3</a></li><li><a href="./test-post4/">Test post 4</a></li></ul></div>');
expect(fs.readFileSync(rootPath + '/build/page/2/index.html', 'utf8')).to.equal('<div><ul><li><a href="../../test-post3">Test post 3</a></li><li><a href="../../test-post4">Test post 4</a></li></ul></div>');
});

it('Should have the correct home page content for the third paginated page', function () {
expect(fs.readFileSync(rootPath + '/build/page/3/index.html', 'utf8')).to.equal('<div><ul><li><a href="./test-post5/">Test post 5</a></li><li><a href="./test-post6/">Test post 6</a></li></ul></div>');
expect(fs.readFileSync(rootPath + '/build/page/3/index.html', 'utf8')).to.equal('<div><ul><li><a href="../../test-post5">Test post 5</a></li><li><a href="../../test-post6">Test post 6</a></li></ul></div>');
});
});

Expand Down
4 changes: 2 additions & 2 deletions gulp/tests/compile-tags.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@
});

it('Should have the correct content for the second paginated page', function () {
expect(fs.readFileSync(rootPath + '/build/tag/mocha/page/2/index.html', 'utf8')).to.equal('<div><ul><li><a href="../../test-post3/">Test post 3</a></li><li><a href="../../test-post4/">Test post 4</a></li></ul></div>');
expect(fs.readFileSync(rootPath + '/build/tag/mocha/page/2/index.html', 'utf8')).to.equal('<div><ul><li><a href="../../../test-post3">Test post 3</a></li><li><a href="../../../test-post4">Test post 4</a></li></ul></div>');
});

it('Should have the correct content for the third paginated page', function () {
expect(fs.readFileSync(rootPath + '/build/tag/mocha/page/3/index.html', 'utf8')).to.equal('<div><ul><li><a href="../../test-post5/">Test post 5</a></li><li><a href="../../test-post6/">Test post 6</a></li></ul></div>');
expect(fs.readFileSync(rootPath + '/build/tag/mocha/page/3/index.html', 'utf8')).to.equal('<div><ul><li><a href="../../../test-post5">Test post 5</a></li><li><a href="../../../test-post6">Test post 6</a></li></ul></div>');
});
});

Expand Down

0 comments on commit a1d9e63

Please sign in to comment.