From c2fd43c3e88e662db9236207fd130def53ad8b26 Mon Sep 17 00:00:00 2001 From: Cheng Zhao Date: Thu, 29 Aug 2013 20:57:09 +0800 Subject: [PATCH] Add spec for protocol.isHandledProtocol. --- spec/api/protocol.coffee | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spec/api/protocol.coffee b/spec/api/protocol.coffee index 0a947aba62e9..8d37431523a8 100644 --- a/spec/api/protocol.coffee +++ b/spec/api/protocol.coffee @@ -70,3 +70,10 @@ describe 'protocol API', -> error: (xhr, errorType, error) -> assert false, 'Got error: ' + errorType + ' ' + error protocol.unregisterProtocol 'atom-file-job' + + describe 'protocol.isHandledProtocol', -> + it 'returns true if the scheme can be handled', (done) -> + assert.equal protocol.isHandledProtocol('file'), true + assert.equal protocol.isHandledProtocol('http'), true + assert.equal protocol.isHandledProtocol('https'), true + assert.equal protocol.isHandledProtocol('atom'), false