api.test.js 499 Bytes
/**
 * http api 测试
 *
 * @author: jiangfeng<jeff.jiang@yoho.cn>
 * @date: 2016/05/17
 */

const test = require('ava');
const sign = require('../../library/sign');
const API = require('../../library/api').ServiceAPI;

const api = new API();

test('api get test', (t) => {
    return api.get('operations/api/v6/category/getCategory', sign.apiSign({})).then(result => {
        if (result && result.code === 200) {
            t.pass();
        } else {
            t.fail();
        }
    });
});