Skip to content

Commit

Permalink
Add tests for <list>: !* ANY
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Feb 24, 2014
1 parent 6635a26 commit 02b355c
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/tests/keywords/update-delete
@@ -0,0 +1,35 @@
#
# PRE: update
#
# Remove all attributes in a list
#
update {
control:Cleartext-Password := 'hello'
reply:Filter-Id := 'filter'
}

update request {
Tmp-String-0 := 'foobarbaz'
Tmp-Integer-0 := 123456789
Tmp-IP-Address-0 := 192.0.2.1
}

if ((Tmp-String-0 != 'foobarbaz') || (Tmp-Integer-0 != 123456789) || (Tmp-IP-Address-0 != 192.0.2.1)) {
update {
reply:Filter-Id := 'fail'
}
}

# Remove all attributes in the control list
update {
request: !* ANY
}

# All attributes should now of been removed
if ((Tmp-String-0 && (Tmp-String-0 == 'foobarbaz')) || \
(Tmp-Integer-0 && (Tmp-Integer-0 == 123456789)) || \
(Tmp-IP-Address-0 && (Tmp-IP-Address-0 == 192.0.2.1))) {
update {
reply:Filter-Id := 'fail'
}
}

0 comments on commit 02b355c

Please sign in to comment.