Merge pull request #321 from silverstripe/fix-archive-year-test

FIX Hardcode the year to the current year in setUp()
This commit is contained in:
Damian Mooyman 2015-11-09 16:51:13 +13:00
commit 01091ee20b
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ class BlogTest extends SapphireTest {
$link = Controller::join_links($blog->Link('archive'));
$this->assertEquals(200, $this->getStatusOf($link), 'HTTP Status should be 200');
$this->assertEquals(SS_Datetime::now()->Year(), ModelAsController::controller_for($blog)->getArchiveYear(), 'Defaults to current year');
$this->assertEquals('2013', ModelAsController::controller_for($blog)->getArchiveYear(), 'Defaults to current year');
$link = Controller::join_links($blog->Link('archive'), 'invalid-year');