Merge branch 'MDL-38419' of https://github.com/moodlerooms/moodle
[moodle.git] / mod / lti / tests / locallib_test.php
index 2c3f392..33a2187 100644 (file)
@@ -139,4 +139,10 @@ class mod_lti_locallib_testcase extends basic_testcase {
 
         lti_verify_sourcedid($ltiinstance, $parsed);
     }
+
+    public function test_lti_ensure_url_is_https() {
+        $this->assertEquals('https://moodle.org', lti_ensure_url_is_https('http://moodle.org'));
+        $this->assertEquals('https://moodle.org', lti_ensure_url_is_https('moodle.org'));
+        $this->assertEquals('https://moodle.org', lti_ensure_url_is_https('https://moodle.org'));
+    }
 }