Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pfefferle committed Feb 6, 2025
1 parent a82ba85 commit f84713f
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions tests/includes/rest/class-test-nodeinfo-controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,16 @@ public function test_get_items() {
$this->assertCount( 3, $data['links'] );

// Test first link.
$this->assertEquals( 'https://nodeinfo.diaspora.software/ns/schema/2.0', $data['links'][0]['rel'] );
$this->assertEquals( 'http://nodeinfo.diaspora.software/ns/schema/2.0', $data['links'][0]['rel'] );
$this->assertStringEndsWith( '/nodeinfo/2.0', $data['links'][0]['href'] );

// Test second link.
$this->assertEquals( 'https://www.w3.org/ns/activitystreams#Application', $data['links'][1]['rel'] );
$this->assertStringEndsWith( '/application', $data['links'][1]['href'] );
$this->assertEquals( 'https://nodeinfo.diaspora.software/ns/schema/2.0', $data['links'][1]['rel'] );
$this->assertStringEndsWith( '/nodeinfo/2.0', $data['links'][1]['href'] );

// Test third link.
$this->assertEquals( 'https://www.w3.org/ns/activitystreams#Application', $data['links'][2]['rel'] );
$this->assertStringEndsWith( '/application', $data['links'][2]['href'] );

// Make sure the links work.
$request = new \WP_REST_Request( 'GET', str_replace( \get_rest_url(), '/', $data['links'][0]['href'] ) );
Expand Down

0 comments on commit f84713f

Please sign in to comment.