Update tests to use new endpoint
This commit is contained in:
parent
45ac35b97b
commit
42a6e85e0e
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* REST API WC Telemetry controller
|
||||
*
|
||||
* Handles requests to the /telemetry endpoint.
|
||||
* Handles requests to the /wc-telemetry endpoint.
|
||||
*
|
||||
* @package WooCommerce\RestApi
|
||||
* @since 3.0.0
|
||||
|
@ -33,7 +33,7 @@ class WC_REST_Telemetry_Controller extends WC_REST_Controller {
|
|||
protected $rest_base = 'tracker';
|
||||
|
||||
/**
|
||||
* Register the route for /telemetry
|
||||
* Register the route for /tracker
|
||||
*/
|
||||
public function register_routes() {
|
||||
register_rest_route(
|
||||
|
|
|
@ -38,7 +38,7 @@ const runTelemetryAPITest = () => {
|
|||
{ version: '1.1' },
|
||||
])( 'errors for invalid request body - %p', async data => {
|
||||
const response = await client
|
||||
.post( `/wc/v3/telemetry`, data )
|
||||
.post( `/wc-telemetry/tracker`, data )
|
||||
.catch( err => {
|
||||
expect( err.statusCode ).toBe( 400 );
|
||||
} );
|
||||
|
@ -48,7 +48,7 @@ const runTelemetryAPITest = () => {
|
|||
|
||||
it( 'returns 200 with correct fields', async () => {
|
||||
const response = await client
|
||||
.post( `/wc/v3/telemetry`, {
|
||||
.post( `/wc-telemetry/tracker`, {
|
||||
platform: 'ios',
|
||||
version: '1.0',
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue