Skip to content

Commit 4087398

Browse files
Pass the quoted value test through the encoding integration test
1 parent 61abed8 commit 4087398

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

test/encoding.js

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,29 @@ QUnit.module('cookie-value', lifecycle);
22

33
QUnit.test('cookie-value with double quotes', function (assert) {
44
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+
});
710
});
811

912
QUnit.test('cookie-value with double quotes in the left', function (assert) {
1013
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+
});
1319
});
1420

1521
QUnit.test('cookie-value with double quotes in the right', function (assert) {
1622
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+
});
1928
});
2029

2130
QUnit.test('RFC 6265 - character not allowed in the cookie-value " "', function (assert) {

0 commit comments

Comments
 (0)