1
問候,我有一個Cuke測試正在測試其他Web服務w/json。它看起來是這樣的:包含或忽略cuke聲明中的未知變量
When "joe" posts the following to "comments" as "application/json":
"""
{
"name": "Pop! Pop!",
"body": "party over here yo!"
}
"""
Then the status code returned should be 201
And the Location header returned should be .*\/comments\/\d+
And the json returned should be
"""
{
"id": 40563
"name": "Pop! Pop!",
"body": "party over here yo!"
}
"""
的問題是,我不知道,因爲它增加DATEBASE ID的自動編號。有沒有一種方法可以讓斷言忽略該元素?