- Timestamp:
- 11/30/2016 03:02:01 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/rest-api/rest-tags-controller.php
r39193 r39371 553 553 $this->assertEquals( 'New Description', $data['description'] ); 554 554 $this->assertEquals( 'new-slug', $data['slug'] ); 555 } 556 557 public function test_update_item_no_change() { 558 wp_set_current_user( self::$administrator ); 559 $term = get_term_by( 'id', $this->factory->tag->create(), 'post_tag' ); 560 561 $request = new WP_REST_Request( 'PUT', '/wp/v2/tags/' . $term->term_id ); 562 563 $response = $this->server->dispatch( $request ); 564 $this->assertEquals( 200, $response->get_status() ); 565 $request->set_param( 'slug', $term->slug ); 566 567 // Run twice to make sure that the update still succeeds even if no DB 568 // rows are updated. 569 $response = $this->server->dispatch( $request ); 570 $this->assertEquals( 200, $response->get_status() ); 571 572 $response = $this->server->dispatch( $request ); 573 $this->assertEquals( 200, $response->get_status() ); 555 574 } 556 575
Note: See TracChangeset
for help on using the changeset viewer.