Skip to content

Commit 5b36194

Browse files
author
guillermo-fisher
committed
Should be decoding and not encoding the JSON.
1 parent 5529dea commit 5b36194

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/Github/Api/Enterprise/ManagementConsole.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,6 @@ public function keys($hash)
6363
*/
6464
protected function getWithLicenseHash($uri, $hash)
6565
{
66-
return parent::get($uri, array('license_md5' => rawurlencode($hash)));
66+
return $this->get($uri, array('license_md5' => rawurlencode($hash)));
6767
}
6868
}

test/Github/Tests/Api/Enterprise/ManagementConsoleTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function shouldShowConfigData()
1515
{ "status": "DONE", "key": "GitHub utilities" }, { "status": "DONE", "key": "GitHub applications" },
1616
{ "status": "CONFIGURING", "key": "GitHub services" }, { "status": "PENDING", "key":
1717
"Reloading appliance services" } ] }';
18-
$expectedArray = json_encode($expectedJson);
18+
$expectedArray = json_decode($expectedJson);
1919

2020
$api = $this->getApiMock();
2121
$api->expects($this->once())
@@ -53,7 +53,7 @@ public function shouldShowSettingsData()
5353
"file", "bucket": null, "host_name": null, "key_id": null, "access_key": null }, "pages": { "enabled": true },
5454
"collectd": { "enabled": false, "server": "", "port": "", "encryption": "", "username": "foo", "password":
5555
"bar" } }, "run_list": [ "role[configure]" ] }';
56-
$expectedArray = json_encode($expectedJson);
56+
$expectedArray = json_decode($expectedJson);
5757

5858
$api = $this->getApiMock();
5959
$api->expects($this->once())
@@ -72,7 +72,7 @@ public function shouldShowMaintenanceStatus()
7272
$expectedJson = '{ "status": "scheduled", "scheduled_time": "Tuesday, January 22 at 15 => 34 -0800",
7373
"connection_services": [ { "name": "git operations", "number": 0 }, { "name": "mysql queries", "number": 233 },
7474
{ "name": "resque jobs", "number": 54 } ] }';
75-
$expectedArray = json_encode($expectedJson);
75+
$expectedArray = json_decode($expectedJson);
7676

7777
$api = $this->getApiMock();
7878
$api->expects($this->once())
@@ -92,7 +92,7 @@ public function shouldShowAuthorizedKeys()
9292
"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64" },
9393
{ "key": "ssh-rsa AAAAB3NzaC1yc2EAAAAB...", "pretty-print":
9494
"ssh-rsa 01:14:0f:f2:0f:e2:fe:e8:f4:72:62:af:75:f7:1a:88:3e:04:92:64" } ]';
95-
$expectedArray = json_encode($expectedJson);
95+
$expectedArray = json_decode($expectedJson);
9696

9797
$api = $this->getApiMock();
9898
$api->expects($this->once())

0 commit comments

Comments
 (0)