diff --git a/tests/EndpointDatabaseTest.php b/tests/EndpointDatabaseTest.php index 4b080c4..b6d74d1 100644 --- a/tests/EndpointDatabaseTest.php +++ b/tests/EndpointDatabaseTest.php @@ -25,7 +25,6 @@ * @see https://www.notion.so/8284f3ff77e24d4a939d19459e4d6bdc?v=bc3a9ce8cdb84d3faefc9ae490136ac2 * @see https://developers.notion.com/reference/post-database-query */ - it('returns a database endpoint instance', function () { // TODO make tests work again, update for new Filter behaviour @@ -121,7 +120,6 @@ $this->assertCount(0, $resultCollection); }); - it('throws a notion exception for a bad request', function () { // failing /v1/databases @@ -139,9 +137,8 @@ Notion::database('8284f3ff77e24d4a939d19459e4d6bdc')->query(); }); - it('queries a database with and without offset and processes result', function () { -// success /v1/databases/DATABASE_DOES_EXIST/query + // success /v1/databases/DATABASE_DOES_EXIST/query Http::fake([ 'https://api.notion.com/v1/databases/8284f3ff77e24d4a939d19459e4d6bdc/query*' => Http::sequence() ->push( @@ -218,4 +215,3 @@ $page = $resultCollection->first(); $this->assertEquals(0, $page->getProperty('Rollup')->getContent()->count()); }); - diff --git a/tests/TestCase.php b/tests/TestCase.php index bf4db7b..69331a5 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,9 +2,9 @@ namespace FiveamCode\LaravelNotionApi\Tests; +use FiveamCode\LaravelNotionApi\LaravelNotionApiServiceProvider; use Illuminate\Database\Eloquent\Factories\Factory; use Orchestra\Testbench\TestCase as Orchestra; -use FiveamCode\LaravelNotionApi\LaravelNotionApiServiceProvider; class TestCase extends Orchestra { @@ -23,6 +23,7 @@ protected function getPackageProviders($app) LaravelNotionApiServiceProvider::class, ]; } + public function getEnvironmentSetUp($app) { config()->set('database.default', 'testing'); @@ -32,4 +33,4 @@ public function getEnvironmentSetUp($app) $migration->up(); */ } -} \ No newline at end of file +}