From c682a964faa10d29a5ff5b30c8ba8733763d7a2f Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Sat, 14 Sep 2013 15:00:19 +0800 Subject: [PATCH] Add spec for the 'atom' protocol URLs. --- spec/atom-protocol-handler-spec.coffee | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/atom-protocol-handler-spec.coffee diff --git a/spec/atom-protocol-handler-spec.coffee b/spec/atom-protocol-handler-spec.coffee new file mode 100644 index 000000000..75df979bb --- /dev/null +++ b/spec/atom-protocol-handler-spec.coffee @@ -0,0 +1,17 @@ +$ = require 'jquery' +fs = require 'fs' +path = require 'path' + +describe '"atom" protocol URL', -> + it 'sends the file relative in the package as response', -> + called = false + callback = -> called = true + $.ajax + url: 'atom://async/package.json' + success: callback + # In old versions of jQuery, ajax calls to custom protocol would always + # be treated as error eventhough the browser thinks it's a success + # request + error: callback + + waitsFor 'request to be done', -> called is true