diff options
Diffstat (limited to 'tests/unit_tests')
| -rw-r--r-- | tests/unit_tests/utils_test.coffee | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/unit_tests/utils_test.coffee b/tests/unit_tests/utils_test.coffee index 3001bb10..366133ac 100644 --- a/tests/unit_tests/utils_test.coffee +++ b/tests/unit_tests/utils_test.coffee @@ -37,7 +37,16 @@ context "convertToUrl", assert.equal "http://127.0.0.1", Utils.convertToUrl("127.0.0.1") assert.equal "http://127.0.0.1:8080", Utils.convertToUrl("127.0.0.1:8080") assert.equal "http://[::]:8080", Utils.convertToUrl("[::]:8080") + assert.equal "view-source: 0.0.0.0", Utils.convertToUrl("view-source: 0.0.0.0") should "convert non-URL terms into search queries", -> assert.equal "http://www.google.com/search?q=google", Utils.convertToUrl("google") assert.equal "http://www.google.com/search?q=go%20ogle.com", Utils.convertToUrl("go ogle.com") + +context "Function currying", + + should "Curry correctly", -> + foo = (a, b) -> "#{a},#{b}" + assert.equal "1,2", foo.curry()(1,2) + assert.equal "1,2", foo.curry(1)(2) + assert.equal "1,2", foo.curry(1,2)() |
