/** @overview nodeunit test case. */
var testResource = require('../../../test_resource'),
    mockReq = testResource.requireMockModule('mock_modules/mock_req'),
    mockRes = testResource.requireMockModule('mock_modules/mock_res'),
    mockContext = testResource.requireMockModule('mock_modules/mock_context'),
    defineApemanIdMiddleware = require('../../../../serverside/middleware/define_apeman_id_middleware.js');

exports.setUp = function (done) {
    done();
};

exports.tearDown = function (done) {
    done();
};


exports['Apeman id middleware.'] = function (test) {
    var middleware = defineApemanIdMiddleware(mockContext({
        APEMAN_ID_COOKIE_KEY: 'apeman-id'
    }));
    var req = mockReq({}),
        res = mockRes({});
    req.apemanId = function () {
    };
    middleware(req, res, function () {
        test.done();
    });
};