   beforeEach ->
     ApiClient = require './mocks/ApiClient-fail'
 
-    client = new ApiClient 'https://api.spark.io'
+    client = new ApiClient settings.apiUrl
 
   it 'passes fake credentials', ->
     promise = client.login 'spark-ide', 'foo@bar.com', 'pass'

ApiClient = require '../lib/ApiClient'

describe 'Tests for mocked ApiClient library which functions should succeed', ->
  client = null


    runs ->
      expect(promise).not.toBe(null)
      status = promise.inspect()
      expect(status.state).toBe('fulfilled')
      expect(status.value).not.toBe(null)
      # There should be 2 devices, one connected and one not
