From 9bf0b7a6ba1c75229e47ab579bc2958085608743 Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Wed, 2 Jun 2010 06:49:00 +0000 Subject: [PATCH] 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 --- tests/CMSMainTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/CMSMainTest.php b/tests/CMSMainTest.php index 81249472..74ebb6dd 100644 --- a/tests/CMSMainTest.php +++ b/tests/CMSMainTest.php @@ -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');