/** @overview nodeunit test case. */
var testResource = require('../../../test_resource'),
    mockReq = testResource.requireMockModule('mock_modules/mock_req'),
    mockContext = testResource.requireMockModule('mock_modules/mock_context'),
    defineReqLang = require('../../../../serverside/request/define_req_lang.js');

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

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


exports['Get a lang from a request'] = function (test) {
    var req = mockReq({});
    req.lang = defineReqLang(mockContext({
        SUPPORTED_LANGS: 'en,ja',
        DEFAULT_LANG: 'en'
    }));
    test.equal(req.lang(), 'en');
    test.done();
};