Skip to content

Commit

Permalink
Up the coverage a bit(?)
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Erkelens committed Jun 8, 2018
1 parent 8ce8304 commit 28470d5
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions tests/unit/PartialFormSubmissionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,44 @@ public function testGetCMSFields()
$this->assertInstanceOf(GridField::class, $fields->dataFieldByName('PartialFields'));
}

public function testCanCreate()
{
$this->assertTrue($this->submission->canCreate());

$this->submission->ParentID = $this->submission->UserDefinedFormID;
$this->submission->UserDefinedFormID = 0;

$this->assertTrue($this->submission->canCreate());
}

public function testCanView()
{
$this->assertTrue($this->submission->canView());

$this->submission->ParentID = $this->submission->UserDefinedFormID;
$this->submission->UserDefinedFormID = 0;

$this->assertTrue($this->submission->canView());
}

public function testCanEdit()
{
$this->assertTrue($this->submission->canEdit());

$this->submission->ParentID = $this->submission->UserDefinedFormID;
$this->submission->UserDefinedFormID = 0;

$this->assertTrue($this->submission->canEdit());
}

public function testCanDelete()
{
$this->assertTrue($this->submission->canDelete());

$this->submission->ParentID = $this->submission->UserDefinedFormID;
$this->submission->UserDefinedFormID = 0;

$this->assertTrue($this->submission->canDelete());
}

public function testGetParent()
Expand Down

0 comments on commit 28470d5

Please sign in to comment.