forked from alexbain/lirc_web
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlirc_web.js
More file actions
28 lines (19 loc) · 738 Bytes
/
lirc_web.js
File metadata and controls
28 lines (19 loc) · 738 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
var app = require('../app'),
assert = require('assert'),
request = require('supertest'),
sinon = require('sinon');
describe('lirc_web', function() {
describe('routes', function() {
it('should have an index route accessible via GET', function(done) {
assert(request(app).get('/').expect(200, done));
});
it('should have an API route accessible via POST', function(done) {
assert(request(app).post('/remotes/tv/power').expect(200, done));
});
});
describe('index action', function() {
it('should return an HTML document', function(done) {
assert(request(app).get('/').expect('Content-Type', /html/, done));
});
});
});