From 3a516626fa235040e9094b91cf97e9321e352c37 Mon Sep 17 00:00:00 2001 From: Dmitrii Metelkin Date: Fri, 19 Aug 2016 10:37:52 +1000 Subject: [PATCH] Update wantsurl related tests --- tests/auth_plugin_test.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/auth_plugin_test.php b/tests/auth_plugin_test.php index 439db68..97a74ab 100644 --- a/tests/auth_plugin_test.php +++ b/tests/auth_plugin_test.php @@ -536,12 +536,12 @@ class auth_plugin_userkey_testcase extends advanced_testcase { $DB->insert_record('user_private_key', $key); $_POST['key'] = 'WantsUrl'; - $_POST['wantsurl'] = '/course/index.php'; + $_POST['wantsurl'] = '/course/index.php?id=12&key=134'; // Using @ is the only way to test this. Thanks moodle! $redirect = @$this->auth->user_login_userkey(); - $this->assertEquals('/course/index.php', $redirect); + $this->assertEquals('/course/index.php?id=12&key=134', $redirect); } /** @@ -561,12 +561,12 @@ class auth_plugin_userkey_testcase extends advanced_testcase { $DB->insert_record('user_private_key', $key); $_POST['key'] = 'WantsUrlExternal'; - $_POST['wantsurl'] = 'http://test.com/course/index.php'; + $_POST['wantsurl'] = 'http://test.com/course/index.php?id=12&key=134'; // Using @ is the only way to test this. Thanks moodle! $redirect = @$this->auth->user_login_userkey(); - $this->assertEquals('http://test.com/course/index.php', $redirect); + $this->assertEquals('http://test.com/course/index.php?id=12&key=134', $redirect); } }