File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed
Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change 77use FiveamCode \LaravelNotionApi \Exceptions \NotionException ;
88use Illuminate \Support \Facades \Http ;
99
10+ $ httpRecorder = null ;
11+
1012beforeEach (function () {
11- Http::recordAndFakeLater ('https://api.notion.com/v1/comments* ' )
13+ $ this -> httpRecorder = Http::recordAndFakeLater ('https://api.notion.com/v1/comments* ' )
1214 ->storeIn ('snapshots/comments ' );
1315});
1416
1517it ('should fetch list of comments with an accurate representation of attributes ' , function () {
18+ $ this ->httpRecorder ->nameForNextRequest ('list-of-comments ' );
19+
1620 $ commentCollection = \Notion::comments ()->ofBlock ('cb588bcbcbdb4f2eac3db05446b8f5d9 ' );
1721
1822 $ collection = $ commentCollection ->asCollection ();
4145});
4246
4347it ('should throw correct exception if block_id has not been found when listing comments ' , function () {
48+ $ this ->httpRecorder ->nameForNextRequest ('comment-not-found ' );
4449 $ this ->expectException (NotionException::class);
4550 $ this ->expectExceptionMessage ('Not Found ' );
4651 $ this ->expectExceptionCode (404 );
Original file line number Diff line number Diff line change 2121use FiveamCode \LaravelNotionApi \Entities \Properties \Url ;
2222use Illuminate \Support \Facades \Http ;
2323
24+ $ httpRecorder = null ;
25+
2426beforeEach (function () {
25- Http::recordAndFakeLater ('https://api.notion.com/v1/databases* ' )
27+ $ this -> httpRecorder = Http::recordAndFakeLater ('https://api.notion.com/v1/databases* ' )
2628 ->storeIn ('snapshots/databases ' );
2729});
2830
2931it ('should create a new database with all available properties ' , function () {
3032
33+ $ this ->httpRecorder ->nameForNextRequest ('all-properties ' );
34+
3135 $ selectOptions = [
3236 [
3337 'name ' => 'testing ' ,
You can’t perform that action at this time.
0 commit comments