'use strict';

const assert = require('assert');
const app = require('../../../src/app');
const mockAws = require('./aws/s3.mock');
const mockery = require('mockery');

describe('fileStorage service', function () {

	before(function (done) {
		// Enable mockery to mock objects
		mockery.enable({
			warnOnUnregistered: false
		});

		mockery.registerMock('aws-sdk', mockAws);

		delete require.cache[require.resolve('../../../src/services/fileStorage/strategies/awsS3')];
		done();
	});

	after(function () {
		mockery.deregisterAll();
		mockery.disable();
	});

	it('registered the fileStorage service', () => {
		assert.ok(app.service('fileStorage'));
	});

	it('should has a properly worked creation function', () => {
		assert.ok(app.service('fileStorage').create({schoolId: '0000d186816abba584714c5f'}));
	});
});

@@ -663,148 +663,496 @@
 it('
-should has a properly worked creation function', () =%3E %7B%0A%09%09assert.ok(app.service('fileStorage').create(%7BschoolId: '0000d186816abba584714c5f'
+registered the fileModel service', () =%3E %7B%0A%09%09assert.ok(app.service('files'));%0A%09%7D);%0A%0A%09it('registered the directoryModel service', () =%3E %7B%0A%09%09assert.ok(app.service('directories'));%0A%09%7D);%0A%0A%09it('should has a properly worked creation function', () =%3E %7B%0A%09%09assert.ok(app.service('fileStorage').create(%7BschoolId: '0000d186816abba584714c5f'%7D));%0A%09%7D);%0A%0A%09it('should has a properly worked find function', () =%3E %7B%0A%09%09assert.ok(app.service('fileStorage').find(%7Bqs: %7Bpath: 'users/0000d213816abba584714c0a/'%7D
 %7D));

add some tests