mirror of
https://github.com/silverstripe/silverstripe-blog
synced 2024-10-22 11:05:58 +02:00
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:
commit
01091ee20b
@ -110,7 +110,7 @@ class BlogTest extends SapphireTest {
|
|||||||
|
|
||||||
$link = Controller::join_links($blog->Link('archive'));
|
$link = Controller::join_links($blog->Link('archive'));
|
||||||
$this->assertEquals(200, $this->getStatusOf($link), 'HTTP Status should be 200');
|
$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');
|
$link = Controller::join_links($blog->Link('archive'), 'invalid-year');
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user