Skip to content

Commit

Permalink
test(list_archives): add timezone
Browse files Browse the repository at this point in the history
  • Loading branch information
curbengh committed Dec 16, 2019
1 parent 1bb233a commit f5a7b1f
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion test/scripts/helpers/list_archives.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,5 +178,20 @@ describe('list_archives', () => {
].join(''));
});

it('timezone');
it('timezone', () => {
ctx.config.timezone = 'Asia/Tokyo';
const result = listArchives({
format: 'YYYY MM ZZ'
});

result.should.eql([
'<ul class="archive-list">',
'<li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/02/">2014 02 +0900</a><span class="archive-list-count">1</span></li>',
'<li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/10/">2013 10 +0900</a><span class="archive-list-count">1</span></li>',
'<li class="archive-list-item"><a class="archive-list-link" href="/archives/2013/06/">2013 06 +0900</a><span class="archive-list-count">2</span></li>',
'</ul>'
].join(''));

ctx.config.timezone = '';
});
});

0 comments on commit f5a7b1f

Please sign in to comment.