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
6 changes: 1 addition & 5 deletions tests/EndpointDatabaseTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -121,7 +120,6 @@
$this->assertCount(0, $resultCollection);
});


it('throws a notion exception for a bad request', function () {

// failing /v1/databases
Expand All @@ -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(
Expand Down Expand Up @@ -218,4 +215,3 @@
$page = $resultCollection->first();
$this->assertEquals(0, $page->getProperty('Rollup')->getContent()->count());
});

5 changes: 3 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -23,6 +23,7 @@ protected function getPackageProviders($app)
LaravelNotionApiServiceProvider::class,
];
}

public function getEnvironmentSetUp($app)
{
config()->set('database.default', 'testing');
Expand All @@ -32,4 +33,4 @@ public function getEnvironmentSetUp($app)
$migration->up();
*/
}
}
}