Skip to content

Commit 62d4230

Browse files
committed
Merge pull request #75 from intercom/jo/updateuserid
updateUser does not require ID
2 parents da5adbb + 8a23d7d commit 62d4230

2 files changed

Lines changed: 6 additions & 5 deletions

File tree

src/Intercom/Service/config/intercom_public_user.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@
134134
"parameters": {
135135
"id": {
136136
"location": "json",
137-
"required": true,
137+
"required": false,
138138
"type": "string"
139139
},
140140
"companies": {

tests/Intercom/Resources/UserTest.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,12 @@ public function testGetUsersBySegmentID()
118118
$this->assertRequest('GET', '/users?segment_id=20');
119119
}
120120

121-
/**
122-
* @expectedException \Guzzle\Service\Exception\ValidationException
123-
*/
124121
public function testUpdateUserNoID()
125122
{
126-
$this->client->updateUser();
123+
$this->setMockResponse($this->client, 'User/User.txt');
124+
$response = $this->client->updateUser(['user_id' => '1234', 'hi' => 'hello', 'new_session' => true]);
125+
126+
$this->assertRequest('POST', '/users');
127+
$this->assertRequestJson(['user_id' => '1234', 'new_session' => true]);
127128
}
128129
}

0 commit comments

Comments
 (0)