*** Settings ***
Resource          flow_zmx.resource
Resource          res_zmx.resource

*** Variables ***
${path}           /api/v1/plan/delete_trigger

*** Test Cases ***
正例-正常删除计划触发器
    [Tags]    F
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}    {"plan_id":"${plan_id}","trigger_id":"${trigger_id}"}    200    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    200

反例-不传入token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}    {"plan_id":"${plan_id}","trigger_id":"${trigger_id}"}    401    ${EMPTY}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

反例-传入空白token
    [Tags]    E
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}    {"plan_id":"${plan_id}","trigger_id":"${trigger_id}"}    401    {}
    log    ${content}
    Should Be Equal As Strings    ${content["code"]}    401

反例-不传入plan_id参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}    {"trigger_id":"${trigger_id}"}    422    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["detail"][0]["type"]}    missing

反例-不传入trigger_id参数
    [Tags]    E
    create session    URI    ${URL}
    ${content}    POST请求结果    ${path}    {"plan_id":"${plan_id}"}    422    ${token}
    log    ${content}
    Should Be Equal As Strings    ${content["detail"][0]["type"]}    missing
