mirror of
https://github.com/atom/atom.git
synced 2026-01-21 04:48:12 -05:00
Add spec for the 'atom' protocol URLs.
This commit is contained in:
17
spec/atom-protocol-handler-spec.coffee
Normal file
17
spec/atom-protocol-handler-spec.coffee
Normal file
@@ -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
|
||||
Reference in New Issue
Block a user