From 376e7bf3b0a64a444ba8672cd3d3e9ca2a17eeb1 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 15 Oct 2010 02:35:17 +0000 Subject: [PATCH] MINOR: Added test for #5657 (from r106081) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112485 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 65fb6613..ef412ea2 100644 --- a/tests/CMSMainTest.php +++ b/tests/CMSMainTest.php @@ -48,6 +48,11 @@ class CMSMainTest extends FunctionalTest { $this->assertTrue(property_exists($responseData['modified'], '1')); $this->assertTrue(property_exists($responseData['modified'], '2')); } + + // 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');