Skip to content

Instantly share code, notes, and snippets.

@vjandrea
Created March 13, 2017 21:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vjandrea/3e264e65e1104cd1f6262b121f8e070b to your computer and use it in GitHub Desktop.
Save vjandrea/3e264e65e1104cd1f6262b121f8e070b to your computer and use it in GitHub Desktop.
Failing ApiAssetsCest::updateAssetWithPatch
2) ApiAssetsCest: Update an asset with patch
 Test  tests/api/ApiAssetsCest.php:updateAssetWithPatch
 Step  See response contains json {"id":101,"name":"Open-architected 4thgeneration neural-net","asset_tag":"574632016","serial":"06665cae-548e-3745-91e0-fd76d30706d4","model":{"id":5,"name":"Profit-focused upward-trending complexi...}
 Fail  Response JSON does not contain the provided JSON

- Expected | + Actual
@@ @@
Array (
'id' => 101
-    'name' => 'Open-architected 4thgeneration neural-net'
-    'asset_tag' => '574632016'
+    'name' => '2'
+    'asset_tag' => '424810223'

@@ @@
'available_actions' => Array (...)
+    'created_at' => Array (...)
+    'updated_at' => Array (...)
+    'purchase_date' => Array (...)
+    'last_checkout' => null
+    'expected_checkin' => null
+    'purchase_cost' => '40.06'
)

Scenario Steps:

 14. $I->seeResponseContainsJson({"id":101,"name":"Open-architected 4thgeneration neural-net","asset_tag":"574632016","serial":"06665cae-548e-3745-91e0-fd76d30706d4","model":{"id":5,"name":"Profit-...}) at tests/api/ApiAssetsCest.php:273
 13. $I->seeResponseCodeIs(200) at tests/api/ApiAssetsCest.php:198
 12. $I->seeResponseIsJson() at tests/api/ApiAssetsCest.php:197
 11. $I->sendGET("/hardware/101") at tests/api/ApiAssetsCest.php:195
 10. $I->assertEquals(101,101) at tests/api/ApiAssetsCest.php:186
 9. $I->assertEquals("Asset updated successfully.","Asset updated successfully.") at tests/api/ApiAssetsCest.php:184

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment