   text = 'valar morghulis'
 
   afterEach (done) ->
-    protocol.unregisterProtocol protocolName, -> done()
-
-  describe 'protocol.unregisterProtocol', ->
-    it 'returns error when scheme does not exist', (done) ->
-      protocol.unregisterProtocol 'not-exist', (error) ->
-        assert.notEqual error, null
-        done()
+    protocol.unregisterProtocol protocolName, ->
+      protocol.uninterceptProtocol 'http', -> done()
 
   describe 'protocol.register(Any)Protocol', ->
     emptyHandler = (request, callback) -> callback()

            assert.equal errorType, 'error'
            done()

  describe 'protocol.isHandledProtocol', ->
    it 'returns true for file:', (done) ->
      protocol.isHandledProtocol 'file', (result) ->
        assert.equal result, true
        done()

    it 'returns true for http:', (done) ->
      protocol.isHandledProtocol 'http', (result) ->
        assert.equal result, true
        done()

    it 'returns true for https:', (done) ->
      protocol.isHandledProtocol 'https', (result) ->
        assert.equal result, true
        done()

    it 'returns false when scheme is not registred', (done) ->
      protocol.isHandledProtocol 'atom', (result) ->
        assert.equal result, false
        done()

            done()
          error: (xhr, errorType, error) ->
            done(error)

  describe 'protocol.unregisterProtocol', ->
    it 'returns error when scheme does not exist', (done) ->
      protocol.unregisterProtocol 'not-exist', (error) ->
        assert.notEqual error, null
        done()

  describe 'protocol.registerStringProtocol', ->
    it 'sends string as response', (done) ->
