Skip to content

Commit

Permalink
MDL-59832 core_course: removed faulty logic in unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
mdjnelson committed Aug 30, 2017
1 parent 8c2465e commit 431723e
Showing 1 changed file with 0 additions and 17 deletions.
17 changes: 0 additions & 17 deletions course/tests/courselib_test.php
Original file line number Diff line number Diff line change
Expand Up @@ -3024,23 +3024,6 @@ public function test_course_get_user_navigation_options_for_frontpage() {
$this->assertTrue($navoptions->tags);
$this->assertTrue($navoptions->search);
$this->assertTrue($navoptions->calendar);

// Standar using viewing frontpage settings from a course where is enrolled.
$course = self::getDataGenerator()->create_course();
// Create a viewer user.
$viewer = self::getDataGenerator()->create_user();
$studentrole = $DB->get_record('role', array('shortname' => 'student'));
$this->getDataGenerator()->enrol_user($viewer->id, $course->id, $studentrole->id);
$this->setUser($viewer);

$navoptions = course_get_user_navigation_options($context, $course);
$this->assertTrue($navoptions->blogs);
$this->assertFalse($navoptions->notes);
$this->assertTrue($navoptions->participants);
$this->assertTrue($navoptions->badges);
$this->assertTrue($navoptions->tags);
$this->assertTrue($navoptions->search);
$this->assertTrue($navoptions->calendar);
}

/**
Expand Down

0 comments on commit 431723e

Please sign in to comment.