/** @overview nodeunit test case. */

var testResource = require('../../../test_resource'),
    mockContext = testResource.requireMockModule('mock_modules/mock_context'),
    defineReqEnhanceMiddleware = require('../../../../serverside/middleware/define_req_enhance_middleware.js');

exports.setUp = function (done) {
    defineReqEnhanceMiddleware.__loadModules = defineReqEnhanceMiddleware._loadModules;
    defineReqEnhanceMiddleware._loadModules = function () {
        return {};
    };
    done();
};

exports.tearDown = function (done) {
    defineReqEnhanceMiddleware._loadModules = defineReqEnhanceMiddleware.__loadModules;
    done();
};


exports['Req enhance middleware.'] = function (test) {
    test.ok(
        defineReqEnhanceMiddleware(mockContext({
            requestEnhanceFunctions: {}
        }))
    );
    test.done();
};