diff options
Diffstat (limited to 'test/javascript')
-rw-r--r-- | test/javascript/sql.test.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/javascript/sql.test.js b/test/javascript/sql.test.js new file mode 100644 index 0000000000..4eb5e6a268 --- /dev/null +++ b/test/javascript/sql.test.js @@ -0,0 +1,14 @@ +/* eslint-env node, jest */ + +var Sql = require('phpmyadmin/sql'); + +describe('SQL', () => { + test('test URL encode', () => { + const urlDecoded = Sql.urlDecode('phpmyadmin+the+web+%C3%BB%C3%AF'); + expect(urlDecoded).toEqual('phpmyadmin the web ûï'); + }); + test('test URL decode', () => { + const urlEncoded = Sql.urlEncode('phpmyadmin the web ûï'); + expect(urlEncoded).toEqual('phpmyadmin+the+web+%C3%BB%C3%AF'); + }); +}); |