New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add block data to REST API #2649

Closed
wants to merge 54 commits into
base: master
from
Commits
Jump to file or symbol
Failed to load files and symbols.
+2 −2
Diff settings

Always

Just for now

Viewing a subset of changes. View all

update tests for new demo data

  • Loading branch information...
adamsilverstein committed Jan 2, 2018
commit bd638d1cc576cb6f6e78b20d2634472581b4fc8d
@@ -87,8 +87,8 @@ public function test_get_items() {
$first_block_url_attribute = wp_unslash( $blocks[0]['attributes']['url'] );
$first_block_type = wp_unslash( $blocks[0]['type'] );
$this->assertEquals( count( $blocks ), 43, 'The demo post content api call should contain 43 blocks.' );
$this->assertEquals( 'https://cldup.com/GCwahb3aOb.jpg', $first_block_url_attribute, 'Block attributes should be returned correctly.' );
$this->assertEquals( count( $blocks ), 36, 'The demo post content api call should contain 36 blocks.' );
$this->assertEquals( 'https://cldup.com/Fz-ASbo2s3.jpg', $first_block_url_attribute, 'Block attributes should be returned correctly.' );
$this->assertEquals( 'core/cover-image', $first_block_type, 'Block type should be returned correctly.' );
}
ProTip! Use n and p to navigate between commits in a pull request.