         req.end()
     )
 
+    it('should give list of sensors for a logged user', (done) ->
+        options = defaultQueryOptions('/sensors/', 'GET')
+        http.get(options, (res) ->
+            res.statusCode.should.eql(200)
+            res.on('data', (data) ->
+                body = data.toString('utf8')
+                body = JSON.parse(body)
+
+                # Fixtures currently have size 12
+                body.should.have.length(12)
+                first_sensor = body[0]
+                first_sensor.should.have.property('identifier')
+                first_sensor.identifier.should.be.eql('MOISTURE_3')
+
+                first_sensor.should.have.property('model')
+                first_sensor.should.have.property('hub')
+                first_sensor.should.have.property('room')
+
+
+            )
+            done()
+        )
+    )
+
 )

        )
    )

    it('should authenticate a user', (done) ->
        qstring = JSON.stringify({
            "username": "test",
            "password": "test"
        })
        options = defaultQueryOptions('/login', 'POST')
        req = http.request(options)
        req.on('response', (res) ->
            res.on('data', (data) ->

            "Content-type": "application/json"
        }
    }
    if user_id and api_key
        options.path = addQSParm(options.path, "user_id", user_id)
        options.path = addQSParm(options.path, "api_key", api_key)

    return options

describe('API Integration tests:', () ->
