pulsar/spec/atom-protocol-handler-spec.coffee

16 lines
511 B
CoffeeScript
Raw Normal View History

{$} = require '../src/space-pen-extensions'
2013-09-14 11:00:19 +04:00
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
2013-09-16 20:05:09 +04:00
# request.
2013-09-14 11:00:19 +04:00
error: callback
waitsFor 'request to be done', -> called is true