Commit Graph

4 Commits

Author SHA1 Message Date
Rodrigo Primo e325eafc9a Remove image after unit tests to make sure they pass on Travis
The test
WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_download_image_and_return_array()
was failing on Travis with the error below due images being kept on
accros different tests. To fix this problem, this commit makes sure that
every test that creates an image, removes it after the assertions.

```
1) WC_Tests_API_Functions::test_wc_rest_upload_image_from_url_should_download_image_and_return_array

Failed asserting that two arrays are equal.

--- Expected
+++ Actual

@@ @@

 Array (
-    'file' => '/tmp/wordpress/wp-content/uploads/2020/01/Dr1Bczxq4q.png'
-    'url' => 'http://example.org/wp-content/uploads/2020/01/Dr1Bczxq4q.png'
+    'file' => '/tmp/wordpress/wp-content/uploads/2020/01/Dr1Bczxq4q-3.png'
+    'url' => 'http://example.org/wp-content/uploads/2020/01/Dr1Bczxq4q-3.png'

/home/travis/build/woocommerce/woocommerce-rest-api/unit-tests/Tests/Version3/functions.php:113
```

(https://travis-ci.org/woocommerce/woocommerce-rest-api/jobs/634921426#L719)
2020-01-15 20:25:02 -03:00
Christopher Allford 0704f6d023 Added support for filtering products and variations by their menu_order 2019-12-18 19:20:12 -03:00
Mike Jolley 46453550e8 Update dist file and namespaces 2019-06-21 10:40:39 +01:00
Mike Jolley 191eb4865b Namespaced v3 tests to v4 2019-06-10 12:36:11 +01:00