"use strict";

var app = require('../../lib/app');

// Test for the dynamic registration end point


describe('POST /register', function() {
  beforeEach(function(done) {
    var self = this;
    request(app).post('/register').type("application/json").send("{}").end(function(err, res) {
      self.res = res;
      done();
    });
  });

  context("While defining the Content-Type: ", function() {
    it('responds with ok', function() {
      request(app).post('/register').type("application/json").send("{}").end(function(err, res) {
        expect(res.statusCode).to.equal(200);
      });
    });
  });
  context("Without defining the content type", function() {
    it('responds with ok', function() {
      request(app).post('/register').send("{}").end(function(err, res) {
        expect(res.statusCode).to.equal(400);
      });
    });
  });

});

@@ -137,205 +137,8 @@
 () %7B
-%0A  beforeEach(function(done) %7B%0A    var self = this;%0A    request(app).post('/register').type(%22application/json%22).send(%22%7B%7D%22).end(function(err, res) %7B%0A      self.res = res;%0A      done();%0A    %7D);%0A  %7D);
 %0A%0A  
@@ -403,16 +403,17 @@
 ;%0A  %7D);%0A
+%0A
   contex
@@ -470,38 +470,53 @@
 %7B%0A    it('re
-sponds with ok
+turns a 400 Bad request error
 ', function(
@@ -656,19 +656,21 @@
     %7D);%0A
-
   %7D);%0A%0A
+%0A%0A
 %7D);%0A

Fix the registration test