/* global describe, it */

var config = require('../../lib/config')
var fs = require('fs')
var hogan = require('hogan.js')
var request = require('./supertest')

/**
 * Manager
 */

var manager = hogan.compile(fs.readFileSync(__dirname +
  '/../../client/manager.html', 'utf8')).render({
  application: config.application,
  segmentio_key: config.segmentio_key,
  static_url: config.static_url,
  version: config.version
})

/**
 * Planner
 */

var planner = hogan.compile(fs.readFileSync(__dirname +
  '/../../client/planner.html', 'utf8')).render({
  application: config.application,
  segmentio_key: config.segmentio_key,
  static_url: config.static_url,
  version: config.version
})

/**
 * Mocha
 */

describe('HTML', function () {
  describe('/manager', function () {
    it('should get manager.html', function (done) {
      request.get('/manager')
        .expect('content-type', 'text/html; charset=utf-8')
        .expect(200)
        .end(function (err, res) {
          if (err) return done(err)
          res.text.should.equal(manager)
          done()
        })
    })
  })

  describe('/', function () {
    it('should get planner.html', function (done) {
      request.get('/')
        .expect('content-type', 'text/html; charset=utf-8')
        .expect(200)
        .end(function (err, res) {
          if (err) return done(err)
          res.text.should.equal(planner)
          done()
        })
    })
  })
})

@@ -89,20 +89,25 @@
 ')%0Avar h
-og
 an
+dlebars
  = requi
@@ -115,14 +115,16 @@
 e('h
-ogan.j
+andlebar
 s')%0A
@@ -192,28 +192,33 @@
  manager = h
-og
 an
+dlebars
 .compile(fs.
@@ -274,39 +274,32 @@
 .html', 'utf8'))
-.render
 (%7B%0A  application
@@ -312,32 +312,50 @@
 ig.application,%0A
+  minified: true,%0A
   segmentio_key:
@@ -479,12 +479,17 @@
  = h
-og
 an
+dlebars
 .com
@@ -565,15 +565,8 @@
 8'))
-.render
 (%7B%0A 
@@ -599,16 +599,34 @@
 cation,%0A
+  minified: true,%0A
   segmen

Fix tests