'use strict';

/*jshint unused: true */
/*exported utils, ProfilTag */


var utils = require('./utils'),
	request = require('supertest'),
	express = require('express'),
	ProfilTag = require('../../../models/ProfilTag'),
	profilTagDao = require('../../../api/dao/profilTag'),
	app = express();

describe('Dao:ProfilTag', function() {

	it('Dao:ProfilTag:createProfilTag', function(done) {
		app.post('/ajouterProfilTag', function(req, res) {
			req.body = {
				profil: '52e52e61c94dbc474373ea69',
				tag: '52e18fb80084242442000001',
				texte: '<p>TestText</p>',
				tagName: 'testTagName',
				police: 'testPolice',
				taille: 'testTaille',
				interligne: 'testInterligne',
				styleValue: 'testStyleValue'
			};
			profilTagDao.createProfilTag(req, res);
		});
		request(app).post('/ajouterProfilTag').expect(200, done);
	});

	it('Dao:ProfilTag:findTagsByProfil', function(done) {
		app.post('/chercherTagsParProfil', function(req, res) {
			req.body = {
				_id: '52e52e61c94dbc474373ea68'
			};
			profilTagDao.findTagsByProfil(req, res);
		});
		request(app).post('/chercherTagsParProfil').expect(200, done);
	});


	it('Dao:ProfilTag:supprimer', function(done) {
		app.post('/supprimerProfilTag', function(req, res) {
			req.body = {
				profil: ' 52e52e61c94dbc474373ea68',
				tag: '52e18fb80084242442000001',
			};
			profilTagDao.supprimer(req, res);
		});
		request(app).post('/supprimerProfilTag').expect(200, done);
	});


});
@@ -442,32 +442,69 @@
 %09%09%09req.body = %7B%0A
+%09%09%09%09_id: '52f2043644a01cd63ba15406',%0A
 %09%09%09%09profil: '52e
@@ -527,16 +527,16 @@
 3ea69',%0A
-
 %09%09%09%09tag:
@@ -1154,16 +1154,609 @@
 ;%0A%09%7D);%0A%0A
+%09it('Dao:ProfilTag:update', function(done) %7B%0A%09%09app.post('/modifierProfilTag', function(req, res) %7B%0A%09%09%09req.body = %7B%0A%09%09%09%09profilTag: %7B%0A%09%09%09%09%09id: '52f2043644a01cd63ba15406',%0A%09%09%09%09%09profil: '52e52e61c94dbc474373ea69',%0A%09%09%09%09%09tag: '52e18fb80084242442000001',%0A%09%09%09%09%09texte: '%3Cp%3ETestText update%3C/p%3E',%0A%09%09%09%09%09tagName: 'testTagName update',%0A%09%09%09%09%09police: 'testPolice update',%0A%09%09%09%09%09taille: 'testTaille update',%0A%09%09%09%09%09interligne: 'testInterligne update',%0A%09%09%09%09%09styleValue: 'testStyleValue update'%0A%0A%09%09%09%09%7D%0A%0A%09%09%09%7D;%0A%09%09%09profilTagDao.update(req, res);%0A%09%09%7D);%0A%09%09request(app).post('/modifierProfilTag').expect(200, done);%0A%09%7D);%0A
 %0A%09it('Da
@@ -2060,14 +2060,15 @@
 e);%0A
-
 %09%7D);%0A%0A%0A
+%0A
 %7D);

Add profiles backend unit tests