 
     it 'should fail if not implemented yet', (done) ->
 
-      forEachProvider (providerSlug) ->
+      forEachProvider (providerSlug, provider, callback) ->
 
         options = { provider : providerSlug }
         withConvertedUserAnd ['ComputeProvider', 'Credential'], options, (data) ->

    it 'should be able to fetch availabe object', (done) ->

      withConvertedUserAndCredential ({ client, credential }) ->
        forEachProvider (providerSlug) ->

          options =
            provider   : providerSlug
            credential : credential

          ComputeProvider.fetchAvailable client, options, (err, data) ->
            return expect(err.message).to.be.equal notImplementedMessage  if err
            expect(err).to.not.exist
            expect(data).to.be.an 'array'
        , done


    it 'should fail if no provider is given', (done) ->

      withDummyClient ({ client }) ->
        forEachProvider (providerSlug) ->
          ComputeProvider.fetchAvailable client, { provider : null }, (err, data) ->
            expect(err?.message).to.be.equal 'No such provider.'
        , done


    it 'should fail if credential is not provided', (done) ->

      withDummyClient ({ client }) ->
        forEachProvider (providerSlug) ->
          options = { provider : providerSlug }

          ComputeProvider.fetchAvailable client, options, (err, data) ->
            expect(err?.message).to.satisfy (msg) ->
              return msg in [notImplementedMessage, 'Credential is required.']
        , done


    it 'should fail if given credential is not valid', (done) ->

      withDummyClient ({ client }) ->
        forEachProvider (providerSlug) ->

          options =
            provider   : providerSlug

        client.r  = { account }
        queue     = []

        forEachProvider (providerSlug, provider, callback) ->
          options = { provider }

          ComputeProvider.ping client, options, (err, data) ->
            expect(err).to.not.exist
            expect(data).to.be.a 'string'
            callback()
        , done


