Skip to content
Merged
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
11 changes: 5 additions & 6 deletions tests/RecordedEndpointDatabasesCreationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,9 @@

expect($databaseEntity->getProperty('Test Relation')->getRelation()[0])->toBe('375da18a-b01d-42d1-8e95-a9dc6a901db1');

expect($databaseEntity->getProperty('Test Rollup')->getContent()["rollup_property_name"])->toBe("Tag");
expect($databaseEntity->getProperty('Test Rollup')->getContent()["relation_property_name"])->toBe("Test Relation");
expect($databaseEntity->getProperty('Test Rollup')->getContent()["function"])->toBe("unique");
expect($databaseEntity->getProperty('Test Rollup')->getContent()['rollup_property_name'])->toBe('Tag');
expect($databaseEntity->getProperty('Test Rollup')->getContent()['relation_property_name'])->toBe('Test Relation');
expect($databaseEntity->getProperty('Test Rollup')->getContent()['function'])->toBe('unique');

expect($databaseEntity->getProperty('Test Select')->getOptions())->toHaveCount(count($selectOptions));
expect($databaseEntity->getProperty('Test Select')->getOptions()[0]->getName())->toEqual($selectOptions[0]['name']);
Expand All @@ -143,20 +143,19 @@
$databaseEntity = Notion::databases()
->build()
->createInPage('0adbc2eb57e84569a700a70d537615be');

expect($databaseEntity->getProperties())->toHaveCount(1);
expect($databaseEntity->getProperty('Name'))->toBeInstanceOf(Title::class);
});


it('should create a new database with emoji icon', function () {
$this->httpRecorder->nameForNextRequest('only-title-properties');

$databaseEntity = Notion::databases()
->build()
->iconEmoji('👍')
->createInPage('0adbc2eb57e84569a700a70d537615be');

expect($databaseEntity->getProperties())->toHaveCount(1);
expect($databaseEntity->getProperty('Name'))->toBeInstanceOf(Title::class);
expect($databaseEntity->getIcon())->toBe('👍');
Expand Down