Skip to content

Commit 578b36c

Browse files
committed
Pest tests work now properly, thanks to @mpociot
1 parent 7c12a43 commit 578b36c

File tree

4 files changed

+7
-51
lines changed

4 files changed

+7
-51
lines changed

tests/EndpointDatabaseTest.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,13 @@
2828

2929
it('returns a database endpoint instance', function () {
3030

31-
// TODO make tests work again, update for new Filter behaviour
32-
$endpoint = \Notion::database('897e5a76ae524b489fdfe71f5945d1af');
31+
// TODO update for new Filter behaviour
32+
$endpoint = Notion::database('897e5a76ae524b489fdfe71f5945d1af');
3333

3434
$this->assertInstanceOf(Database::class, $endpoint);
3535
});
3636

37-
it('queries a database with filter and sorting and processes result', function () {
37+
it('queries a database with filter and sorting and processes result', function ($limit) {
3838
// success /v1/databases/DATABASE_DOES_EXIST/query
3939
Http::fake([
4040
'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::response(

tests/NotionApiTest.php

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,12 @@
55
use FiveamCode\LaravelNotionApi\Notion;
66
use FiveamCode\LaravelNotionApi\NotionFacade;
77
use Illuminate\Support\Collection;
8-
use Orchestra\Testbench\TestCase;
8+
use Orchestra\Testbench\TestCase as Orchestra;
99

1010
/**
11-
* Class EndpointPageTest.
1211
*
13-
* The fake API responses are based on our test environment (since the current Notion examples do not match with the actual calls).
14-
*
15-
* @see https://developers.notion.com/reference/get-page
1612
*/
17-
class NotionApiTest extends TestCase
13+
class NotionApiTest extends Orchestra
1814
{
1915
/**
2016
* @param \Illuminate\Foundation\Application $app
@@ -51,9 +47,4 @@ protected function assertContainsInstanceOf(string $class, $haystack): bool
5147
return false;
5248
}
5349

54-
/** @test */
55-
public function it_asserts_true()
56-
{
57-
$this->assertTrue(true);
58-
}
5950
}

tests/Pest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
use FiveamCode\LaravelNotionApi\Tests\TestCase;
3+
use FiveamCode\LaravelNotionApi\Tests\NotionApiTest;
44

5-
uses(TestCase::class)->in(__DIR__);
5+
uses(NotionApiTest::class)->in(__DIR__);

tests/TestCase.php

Lines changed: 0 additions & 35 deletions
This file was deleted.

0 commit comments

Comments
 (0)