Skip to content

Commit 8094223

Browse files
committed
remove requirement of admin_id from note creation
1 parent fcb906f commit 8094223

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/Intercom/Service/config/intercom_public_note.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@
4646
"parameters": {
4747
"admin_id": {
4848
"location": "json",
49-
"required": true,
5049
"type": "string"
5150
},
5251
"user": {

tests/Intercom/Resources/NoteTest.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,14 @@ public function testCreateNote()
5555
$this->assertRequestJson(['admin_id' => '6', 'user' => ['email' => '[email protected]'], 'body' => 'Hi']);
5656
}
5757

58+
public function testCreateNoteWithoutAdmin() {
59+
$this->setMockResponse($this->client, 'Note/Note.txt');
60+
$this->client->createNote(['user' => ['email' => '[email protected]'], 'body' => 'Hi']);
61+
62+
$this->assertRequest('POST', '/notes');
63+
$this->assertRequestJson(['user' => ['email' => '[email protected]'], 'body' => 'Hi']);
64+
}
65+
5866
/**
5967
* @expectedException \Guzzle\Service\Exception\ValidationException
6068
*/
@@ -94,4 +102,4 @@ public function testCreateNoteNoBody()
94102
{
95103
$this->client->getNote(['admin_id' => '6', 'user' => ['email' => '[email protected]']]);
96104
}
97-
}
105+
}

0 commit comments

Comments
 (0)