diff options
author | Philip Chimento <philip@endlessm.com> | 2013-09-20 10:26:32 -0700 |
---|---|---|
committer | Philip Chimento <philip@endlessm.com> | 2013-09-23 15:40:54 -0700 |
commit | 176dac4f4cc3d575687e50dba4c4cc0906402c0d (patch) | |
tree | 8aa00d4ea1bd8c2409855e7f9762559c6169074e /test | |
parent | 73f112d4cdff1e246f7635fbf4747a21db730329 (diff) |
URIdecode web action name
In case the name of the web action is URIencoded, make sure to URIdecode
it before looking it up in the dictionary of defined web actions.
[endlessm/eos-sdk#310]
Diffstat (limited to 'test')
-rw-r--r-- | test/webhelper/testWebActions.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/webhelper/testWebActions.js b/test/webhelper/testWebActions.js index 72ea6ba..0ecc235 100644 --- a/test/webhelper/testWebActions.js +++ b/test/webhelper/testWebActions.js @@ -127,6 +127,17 @@ function testWebActionIsCalledWithBlankParameter() { assertEquals('', parameterValue); } +function testWebActionIsUriDecoded() { + let actionWasCalled = false; + app.define_web_action('äction💩Quit', function(dict) { + actionWasCalled = true; + app.quit(); + }); + app.webActionToTest = 'endless://%C3%A4ction%F0%9F%92%A9Quit'; + app.run([]); + assertTrue(actionWasCalled); +} + function testDefineMultipleActionsOverride() { let actionWasCalled = false; app.define_web_actions({ |