@@ -2,20 +2,29 @@ QUnit.module('cookie-value', lifecycle);
2
2
3
3
QUnit . test ( 'cookie-value with double quotes' , function ( assert ) {
4
4
assert . expect ( 1 ) ;
5
- Cookies . set ( 'c' , '"' ) ;
6
- assert . strictEqual ( Cookies . get ( 'c' ) , '"' , 'should print the quote character' ) ;
5
+ using ( assert )
6
+ . setCookie ( 'c' , '"' )
7
+ . then ( function ( decodedValue ) {
8
+ assert . strictEqual ( decodedValue , '"' , 'should print the quote character' ) ;
9
+ } ) ;
7
10
} ) ;
8
11
9
12
QUnit . test ( 'cookie-value with double quotes in the left' , function ( assert ) {
10
13
assert . expect ( 1 ) ;
11
- Cookies . set ( 'c' , '"content' ) ;
12
- assert . strictEqual ( Cookies . get ( 'c' ) , '"content' , 'should print the quote character' ) ;
14
+ using ( assert )
15
+ . setCookie ( 'c' , '"content' )
16
+ . then ( function ( decodedValue ) {
17
+ assert . strictEqual ( decodedValue , '"content' , 'should print the quote character' ) ;
18
+ } ) ;
13
19
} ) ;
14
20
15
21
QUnit . test ( 'cookie-value with double quotes in the right' , function ( assert ) {
16
22
assert . expect ( 1 ) ;
17
- Cookies . set ( 'c' , 'content"' ) ;
18
- assert . strictEqual ( Cookies . get ( 'c' ) , 'content"' , 'should print the quote character' ) ;
23
+ using ( assert )
24
+ . setCookie ( 'c' , 'content"' )
25
+ . then ( function ( decodedValue ) {
26
+ assert . strictEqual ( decodedValue , 'content"' , 'should print the quote character' ) ;
27
+ } ) ;
19
28
} ) ;
20
29
21
30
QUnit . test ( 'RFC 6265 - character not allowed in the cookie-value " "' , function ( assert ) {
0 commit comments