Skip to content

Commit

Permalink
Test YAML collections without triple dashes
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Jun 23, 2024
1 parent d86fb35 commit ce499b2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/framework/tests/Feature/DataCollectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,16 @@ public function testYamlCollections()
]), DataCollections::yaml('foo'));
}

public function testYamlCollectionsWithoutTripleDashes()
{
$this->directory('resources/collections/foo');
$this->file('resources/collections/foo/foo.yml', 'title: Foo');

$this->assertEquals(new DataCollections([
'foo/foo.yml' => new FrontMatter(['title' => 'Foo']),
]), DataCollections::yaml('foo'));
}

public function testJsonCollections()
{
$this->directory('resources/collections/foo');
Expand Down

0 comments on commit ce499b2

Please sign in to comment.