From e703053c8a03e89b61e56825fd5d8d4ac793de31 Mon Sep 17 00:00:00 2001 From: hughdevore Date: Mon, 14 Aug 2017 16:52:32 -0600 Subject: [PATCH] #17 Adding unit tests and code cleanup. --- tests/test-media-item-mutations.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/test-media-item-mutations.php b/tests/test-media-item-mutations.php index bb7c2de8a..e58c14a08 100644 --- a/tests/test-media-item-mutations.php +++ b/tests/test-media-item-mutations.php @@ -467,7 +467,7 @@ public function updateMediaItemMutation() { description mimeType author { - username + id } } } @@ -590,6 +590,7 @@ public function testUpdateMediaItemMutation() { * successfully run the mutation */ wp_set_current_user( $this->admin ); + $actual = $this->updateMediaItemMutation(); /** @@ -613,7 +614,9 @@ public function testUpdateMediaItemMutation() { 'status' => strtolower( $this->updated_status ), 'pingStatus' => $this->updated_pingStatus, 'mimeType' => 'image/gif', - 'author' => [ 'username' => 'User 196' ], + 'author' => [ + 'id' => \GraphQLRelay\Relay::toGlobalId( 'user', $this->admin ), + ], ], ], ],