Skip to content

Commit

Permalink
MDL-40552 course: fixup unit test
Browse files Browse the repository at this point in the history
Previously there was an assertion which was never used, now
we ensure to test the course themes functionality each time.
  • Loading branch information
danpoltawski authored and Sam Hemelryk committed Dec 9, 2014
1 parent bf42737 commit 934c729
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions course/tests/externallib_test.php
Expand Up @@ -335,6 +335,8 @@ public function test_create_courses() {

// Enable course completion.
set_config('enablecompletion', 1);
// Enable course themes.
set_config('allowcoursethemes', 1);

// Set the required capabilities by the external function
$contextid = context_system::instance()->id;
Expand Down Expand Up @@ -415,10 +417,7 @@ public function test_create_courses() {
$this->assertEquals($courseinfo->defaultgroupingid, $course2['defaultgroupingid']);
$this->assertEquals($courseinfo->completionnotify, $course2['completionnotify']);
$this->assertEquals($courseinfo->lang, $course2['lang']);

if (!empty($CFG->allowcoursethemes)) {
$this->assertEquals($courseinfo->theme, $course2['forcetheme']);
}
$this->assertEquals($courseinfo->theme, $course2['forcetheme']);

// We enabled completion at the beginning of the test.
$this->assertEquals($courseinfo->enablecompletion, $course2['enablecompletion']);
Expand Down

0 comments on commit 934c729

Please sign in to comment.