     it "should return 200 with the expected routes if API key is valid", ->
       request(server)
         .get('/routes')
-        .headers('api-key': '4321')
+        .headers('API-Key': '4321')
         .json(true)
         .expect(200)
         .expect('Content-Type', /json/)

    it "should return 401 if the API key is invalid", ->
      r = request(server)
        .get('/routes')
        .headers('api-key': 'bar-token')

      helpers.assert401WithInvalidApiKeyHeader r


server = helpers.buildServer '../../api/resources/route',
  '../../data/route': routeData

describe "lib/server", ->
  describe "API key checking disabled", ->
    beforeEach ->
      process.env.RADBUS_API_KEYS_ENABLED = 'false'
    afterEach ->
      delete process.env.RADBUS_API_KEYS_ENABLED

    it "#API key disabled : should return 200 with the expected routes", ->
      request(server)
        .get('/routes')
        .json(true)
