'use strict';

var expect = require('chai').expect;
var request = require('supertest');
var agent = request.agent('http://localhost:1337');

describe('- Hero', function () {
	describe('- createDb()', function () {
		it('- Should create the heroes database and return 200', function (done) {
			agent
				.get('/Hero/createDb')
				.expect(200, done);
		});
	});

	describe('- calculateStats()', function () {
		it('- Should create the heroes database and return 200', function (done) {
			agent
				.post('/Hero/calculateStats')
				.send({
					hero: 'Abigail the Brutal',
					level: 15,
					stars: 3,
					ascensions: 1
				})
				.expect(200, {
					name: 'Abigail the Brutal',
					attack: 400.2,
					defense: 333.9,
					skill: 318,
					health: 1049.4
				}, done);
		});
	});
});

@@ -583,10 +583,10 @@
 el: 
-15
+44
 ,%0A%09%09
@@ -595,17 +595,17 @@
 %09stars: 
-3
+2
 ,%0A%09%09%09%09%09a
@@ -693,13 +693,13 @@
 ck: 
-400.2
+820.6
 ,%0A%09%09
@@ -714,13 +714,11 @@
 se: 
-333.9
+680
 ,%0A%09%09
@@ -731,11 +731,13 @@
 ll: 
-318
+647.7
 ,%0A%09%09
@@ -751,14 +751,14 @@
 th: 
-1049.4
+2140.2
 %0A%09%09%09

update test