MINOR: Added test for #5657

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@106081 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sam Minnee 2010-06-02 06:49:00 +00:00
parent 47ac736d50
commit 9bf0b7a6ba

View File

@ -47,6 +47,11 @@ class CMSMainTest extends FunctionalTest {
$this->assertContains('setNodeTitle(1, \'Page 1\');', $response->getBody());
$this->assertContains('setNodeTitle(2, \'Page 2\');', $response->getBody());
}
// Get the latest version of Page 1
$latestID = DB::query('select max("Version") from "Page_versions" where "RecordID"=1')->value();
$dsCount = DB::query('select count("Version") from "Page_versions" where "RecordID"=1 and "Version"=' . $latestID)->value();
$this->assertEquals(1, $dsCount, "Published page has no duplicate version records: it has " . $dsCount . " for version " . $latestID);
$this->session()->clear('loggedInAs');