Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions src/Macros/PestHttpRecorder.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
use Illuminate\Http\Client\Request;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\File;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Http;
use Illuminate\Support\Str;

Expand Down Expand Up @@ -41,7 +40,6 @@ class HttpRecorder

private $requestNames = [];


public function storeIn($directory)
{
$this->snapshotDirectory = $directory;
Expand Down Expand Up @@ -82,7 +80,7 @@ public function handle(Request $request)
// filter out Notion API Token Header
$header = Arr::except($header, ['Authorization']);

if ($forceRecording || !File::exists($filePath)) {
if ($forceRecording || ! File::exists($filePath)) {
File::makeDirectory($directoryPath, 0744, true, true);

$client = new Client();
Expand Down
10 changes: 4 additions & 6 deletions tests/RecordedEndpointDatabasesCreationTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<?php

use Carbon\Carbon;
use FiveamCode\LaravelNotionApi\Builder\PropertyBuilder;
use FiveamCode\LaravelNotionApi\Entities\Properties\Checkbox;
use FiveamCode\LaravelNotionApi\Entities\Properties\CreatedBy;
Expand Down Expand Up @@ -29,21 +28,20 @@
});

it('should create a new database with all available properties', function () {

$this->httpRecorder->nameForNextRequest('all-properties');

$selectOptions = [
[
'name' => 'testing',
'color' => 'blue'
]
'color' => 'blue',
],
];

$multiSelectOptions = [
[
'name' => 'testing2',
'color' => 'yellow'
]
'color' => 'yellow',
],
];

$scheme = PropertyBuilder::bulk()
Expand Down