Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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
  • Loading branch information...
commit 9bf0b7a6ba1c75229e47ab579bc2958085608743 1 parent 47ac736
@sminnee sminnee authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 tests/CMSMainTest.php
View
5 tests/CMSMainTest.php
@@ -47,6 +47,11 @@ function testPublish() {
$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');
Please sign in to comment.
Something went wrong with that request. Please try again.