Allow returning file for custom protocol.
This commit is contained in:
parent
1ed77371c0
commit
244d7eaf17
4 changed files with 40 additions and 1 deletions
|
@ -13,9 +13,9 @@ describe 'protocol API', ->
|
|||
it 'calls the callback when scheme is visited', (done) ->
|
||||
protocol.registerProtocol 'test2', (url) ->
|
||||
assert.equal url, 'test2://test2'
|
||||
protocol.unregisterProtocol 'test2'
|
||||
done()
|
||||
$.get 'test2://test2', ->
|
||||
protocol.unregisterProtocol 'test2'
|
||||
|
||||
describe 'protocol.unregisterProtocol', ->
|
||||
it 'throws error when scheme does not exist', ->
|
||||
|
@ -40,3 +40,12 @@ describe 'protocol API', ->
|
|||
done()
|
||||
error: (xhr, errorType, error) ->
|
||||
assert false, 'Got error: ' + errorType + ' ' + error
|
||||
|
||||
it 'returns RequestFileJob should send file', (done) ->
|
||||
$.ajax
|
||||
url: 'atom-file-job://' + __filename
|
||||
success: (data) ->
|
||||
console.log data
|
||||
done()
|
||||
error: (xhr, errorType, error) ->
|
||||
assert false, 'Got error: ' + errorType + ' ' + error
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue