Files
EasySoft-ZenTaoPMS/test/api/products/delete.php
zhujinyong de2e4be174 * Fix test.
2021-12-17 10:23:57 +08:00

24 lines
685 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env php
<?php
include dirname(dirname(dirname(__FILE__))) . '/lib/init.php';
/**
title=测试删除产品;
cid=1
pid=1
调用成功返回200 >> 200
调用查找接口成功返回200 >> 200
已删除的产品的deleted字段为1 >> 1
*/
global $token;
$header = array('Token' => $token->token);
$pass = $rest->delete('/products/190', $header);
r($pass->status_code) && p('') && e('200'); //调用成功返回200
$findProduct = $rest->get('/products/190', $header);
r($findProduct->status_code) && p() && e('200'); //调用查找接口成功返回200
r($findProduct->body) && p('deleted') && e('1'); //已删除的产品的deleted字段为1