You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
509 B
20 lines
509 B
it "Should parse cookies" "$({ |
|
HTTP_COOKIE='bob=gob; job=tob' |
|
_exprashInit |
|
output=$(declare -p _exprashCookies) |
|
expected_output='declare -A _exprashCookies=([bob]="gob" [job]="tob" )' |
|
[ "$output" == "$expected_output" ] |
|
})" |
|
|
|
it "Should get cookie value by name" "$({ |
|
HTTP_COOKIE='bob=gob; job=tob' |
|
_exprashInit |
|
[ "$(cookie 'bob')" == 'gob' ] |
|
})" |
|
|
|
it "Should determine if a cookie exists by name" "$({ |
|
HTTP_COOKIE='bob=gob; job=tob' |
|
_exprashInit |
|
hasCookie 'bob' && ! hasCookie 'kob' |
|
})" |
|
|
|
|