-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding simple test to back the new sensors function
- Loading branch information
1 parent
c3f3727
commit f009ea3
Showing
2 changed files
with
27 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
var expect = require("chai").expect | ||
, HueApi = require("../").api | ||
, testValues = require("./support/testValues.js") | ||
; | ||
|
||
describe("Hue API", function () { | ||
|
||
var hue = new HueApi(testValues.host, testValues.username); | ||
|
||
describe("#sensors()", function() { | ||
|
||
it("should obtain all the sensors in the bridge", function() { | ||
return hue.sensors() | ||
.then(function(results) { | ||
expect(results.sensors).to.be.instanceOf(Array); | ||
|
||
expect(results.sensors[0]).to.have.property("id", "1"); | ||
expect(results.sensors[0]).to.have.property("name", "Daylight"); | ||
expect(results.sensors[0]).to.have.property("type", "Daylight"); | ||
expect(results.sensors[0]).to.have.property("manufacturername", "Philips"); | ||
}); | ||
}); | ||
}); | ||
}); |