We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0511acf commit 155e573Copy full SHA for 155e573
tests/EndpointDatabaseTest.php
@@ -104,4 +104,23 @@ public function it_queries_a_database_with_filter_and_sorting_and_processes_resu
104
$this->assertEquals("Betty Holberton", $page->getTitle());
105
}
106
107
+ /** @test */
108
+ public function it_throws_a_notion_exception_bad_request()
109
+ {
110
+ // failing /v1/databases
111
+ Http::fake([
112
+ 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*'
113
+ => Http::response(
114
+ json_decode('{}', true),
115
+ 400,
116
+ ['Headers']
117
+ )
118
+ ]);
119
+
120
+ $this->expectException(NotionException::class);
121
+ $this->expectExceptionMessage("Bad Request");
122
123
+ \Notion::database("8284f3ff77e24d4a939d19459e4d6bdc")->query();
124
+ }
125
126
0 commit comments