mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT: added new PageCommnet to yml so we have different amounts of moderated/unmodereated
BUGFIX: really testing deletemarked now. (from r99679) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@111614 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
d98563e80d
commit
4a613c0e02
@ -64,6 +64,7 @@ SiteConfig_CreateTopLevelGroups:
|
|||||||
GroupID: =>Group.rooteditusers
|
GroupID: =>Group.rooteditusers
|
||||||
PageComment:
|
PageComment:
|
||||||
Comment1:
|
Comment1:
|
||||||
|
ID: 8
|
||||||
Name: Person
|
Name: Person
|
||||||
Comment: Very cool page
|
Comment: Very cool page
|
||||||
NeedsModeration: 1
|
NeedsModeration: 1
|
||||||
@ -73,3 +74,8 @@ PageComment:
|
|||||||
Comment: I am a person
|
Comment: I am a person
|
||||||
NeedsModeration: 0
|
NeedsModeration: 0
|
||||||
EmailAddress: someone@somewhere.com
|
EmailAddress: someone@somewhere.com
|
||||||
|
Comment3:
|
||||||
|
Name: Me
|
||||||
|
Comment: I like this comment
|
||||||
|
NeedsModeration: 1
|
||||||
|
EmailAddress: me@test.co.nz
|
@ -15,7 +15,7 @@ class CommentAdminTest extends FunctionalTest {
|
|||||||
|
|
||||||
$comm = new CommentAdmin();
|
$comm = new CommentAdmin();
|
||||||
$resp = $comm->NumUnmoderated();
|
$resp = $comm->NumUnmoderated();
|
||||||
$this->assertEquals(1, $resp);
|
$this->assertEquals(2, $resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testNumSpam(){
|
function testNumSpam(){
|
||||||
@ -25,11 +25,14 @@ class CommentAdminTest extends FunctionalTest {
|
|||||||
$this->assertEquals(0, $resp);
|
$this->assertEquals(0, $resp);
|
||||||
}
|
}
|
||||||
|
|
||||||
function testacceptmarked(){
|
function testdeletemarked(){
|
||||||
$id = $this->idFromFixture('PageComment', 'Comment1');
|
$comm = $this->objFromFixture('PageComment', 'Comment1');
|
||||||
|
$id = $comm->ID;
|
||||||
$this->logInWithPermission('ADMIN');
|
$this->logInWithPermission('ADMIN');
|
||||||
$result = $this->get('admin/comments/EditForm/field/Comments/item/2/delete');
|
$result = $this->get("admin/comments/EditForm/field/Comments/item/$id/delete");
|
||||||
$this->assertEquals(200, $result->getStatusCode());
|
$checkComm = DataObject::get_by_id('PageComment',$id);
|
||||||
|
|
||||||
|
$this->assertEquals(0, $checkComm->ID);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user