Navigation Menu

Skip to content

Commit

Permalink
test: Add drntest for delete with filter
Browse files Browse the repository at this point in the history
  • Loading branch information
piroor committed Apr 24, 2014
1 parent 31ec95d commit cc5d4f3
Show file tree
Hide file tree
Showing 4 changed files with 61 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/command/suite/groonga/delete/filter.expected
@@ -0,0 +1,19 @@
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "add.result",
"body": true
}
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "delete.result",
"body": [
[
0,
0.0,
0.0
],
true
]
}
19 changes: 19 additions & 0 deletions test/command/suite/groonga/delete/filter.test
@@ -0,0 +1,19 @@
#@include fixture/user-table.jsons
{
"type": "add",
"dataset": "Droonga",
"body": {
"table" : "User",
"key" : "key",
"values" : {
}
}
}
{
"type": "delete",
"dataset": "Droonga",
"body": {
"table" : "User",
"filter" : "_key @^ \"key\""
}
}
14 changes: 14 additions & 0 deletions test/command/suite/groonga/delete/invalid-filter.expected
@@ -0,0 +1,14 @@
{
"inReplyTo": "request-id",
"statusCode": 200,
"type": "delete.result",
"body": [
[
-63,
0.0,
0.0,
"syntax error in filter: <_key>"
],
false
]
}
9 changes: 9 additions & 0 deletions test/command/suite/groonga/delete/invalid-filter.test
@@ -0,0 +1,9 @@
#@include fixture/user-table.jsons
{
"type": "delete",
"dataset": "Droonga",
"body": {
"table" : "User",
"filter" : "_key"
}
}

0 comments on commit cc5d4f3

Please sign in to comment.