Permalink
Browse files

MDL-40547 assign: tests for workflow/allocation

  • Loading branch information...
pcharsle authored and danpoltawski committed Jul 30, 2013
1 parent 6d2fc57 commit d1ec5c839a23822aacd97115c28fd005e6874af8
Showing with 7 additions and 1 deletion.
  1. +7 −1 mod/assign/tests/externallib_test.php
@@ -148,7 +148,9 @@ public function test_get_assignments () {
// Create the assignment module.
$assign1 = self::getDataGenerator()->create_module('assign', array(
'course' => $course1->id,
- 'name' => 'lightwork assignment'
+ 'name' => 'lightwork assignment',
+ 'markingworkflow' => 1,
+ 'markingallocation' => 1
));
// Create manual enrolment record.
@@ -185,6 +187,8 @@ public function test_get_assignments () {
$this->assertEquals($assign1->id, $assignment['id']);
$this->assertEquals($course1->id, $assignment['course']);
$this->assertEquals('lightwork assignment', $assignment['name']);
+ $this->assertEquals(1, $assignment['markingworkflow']);
+ $this->assertEquals(1, $assignment['markingallocation']);
$result = mod_assign_external::get_assignments(array($course1->id));
@@ -199,6 +203,8 @@ public function test_get_assignments () {
$this->assertEquals($assign1->id, $assignment['id']);
$this->assertEquals($course1->id, $assignment['course']);
$this->assertEquals('lightwork assignment', $assignment['name']);
+ $this->assertEquals(1, $assignment['markingworkflow']);
+ $this->assertEquals(1, $assignment['markingallocation']);
$result = mod_assign_external::get_assignments(array($course2->id));

0 comments on commit d1ec5c8

Please sign in to comment.