Add some fixes to delete mock method
This commit is contained in:
parent
f3d63cf3ef
commit
6bd008c5ec
1 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,7 @@ class HttpMockServer {
|
|||
GPathResult request = new XmlSlurper().parse(ex.requestBody)
|
||||
if(ex.requestMethod== 'POST' && request.name() == 'addMock'){
|
||||
addMockAction(request, ex)
|
||||
}else if(ex.requestMethod == 'DELETE' && request.name() == 'removeMock'){
|
||||
}else if(ex.requestMethod == 'POST' && request.name() == 'removeMock'){
|
||||
removeMockAction(request, ex)
|
||||
}
|
||||
//TODO add list mock
|
||||
|
@ -67,6 +67,7 @@ class HttpMockServer {
|
|||
MockAction action = e.actions.find {it.name == name}
|
||||
if(action){
|
||||
e.actions.remove(action)
|
||||
actionsNames.remove(name)
|
||||
}
|
||||
}}
|
||||
ex.responseBody << '<mockRemoved/>'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue