test: cover project link rendering in project-list block

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
chrnxandClaude Opus 5 committed 2026-08-15 14:16:49 -05:00
1 parent cf3d4e0729
commit 77b7e8f658
1 file changed
+21
+21
View File
@@ -37,6 +37,27 @@ class ProjectBlocksTest extends WP_UnitTestCase {
$this->assertStringContainsString( 'Beta', $markup );
}
/**
* Ensure stored project links render with their platform icons.
*/
public function test_project_list_renders_stored_links() {
$term_id = self::factory()->term->create(
array(
'taxonomy' => 'chrnx_project',
'name' => 'Matcha CLI',
'slug' => 'matcha-cli-test',
)
);
update_term_meta( $term_id, 'chrnx_project_repo', 'https://example.com/repo' );
update_term_meta( $term_id, 'chrnx_project_package', 'https://example.com/package' );
$markup = do_blocks( '<!-- wp:chrnx/project-list /-->' );
$this->assertStringContainsString( 'chrnx-platform-links', $markup );
$this->assertStringContainsString( 'https://example.com/repo', $markup );
$this->assertStringContainsString( 'https://example.com/package', $markup );
}
/**
* Ensure a project without a cover still renders art.
*/