1
0
mirror of https://github.com/flextype/flextype.git synced 2025-08-08 06:06:45 +02:00

fix(tests): fix tests for shortcodes

This commit is contained in:
Awilum
2022-05-25 19:38:38 +03:00
parent 66616bfa56
commit 4f362dd9b4

View File

@@ -27,7 +27,7 @@ test('entries shortcode', function () {
$this->assertTrue(entries()->create('blog-3', ['title' => 'Blog', 'category-cat' => "(entries fetch:'categories/cat' field:'title2,Foo' /)"]));
expect(entries()->fetch('blog-3')['category-cat'])->toBe('Foo');
$this->assertTrue(entries()->create('shop', ['vars' => ['id' => 'shop', 'options' => 'collection=true', 'field' => 'title'], 'title' => 'Shop', 'products' => "@type[array] (entries fetch:'(var:id),(var:options)' field:'(var:field)' /)"]));
$this->assertTrue(entries()->create('shop', ['vars' => ['id' => 'shop', 'options' => 'collection=true'], 'title' => 'Shop', 'products' => "@type[array] (entries fetch:'(var:id),(var:options)' /)"]));
$this->assertTrue(entries()->create('shop/product-1', ['title' => 'Product 1']));
expect(count(entries()->fetch('shop')['products']))->toBe(1);
});