xdescribe('UrlRequest', function(){
var UrlRequest = require('../../../lib/core/opal/UrlRequest.js').UrlRequest;

    var req;

    var url = 'http://onet.pl', url2 = 'http://onetapi.pl';
    var post = 'POST', get = 'GET';
    var header = 123, headers = {
        'X-Onet': 456,
        'X-Jasmine': 789
    };
    var data = 'abcdefghijklmnoprstuwz';

    beforeEach(function(){
        req = new UrlRequest(url);
    });

    it('constructor', function(){
        expect(req.getUrl()).toEqual(url);
    });
    
    it('setGetUrl', function(){
        expect(req.setUrl(url2)).toBe(req);
        expect(req.getUrl()).toEqual(url2);
    });

    it('setGetMethod-GET', function(){
        expect(req.setMethod(get)).toBe(req);
        expect(req.getMethod()).toEqual(UrlRequest.GET);
    });

    it('setGetMethod-POST', function(){
        expect(req.setMethod(post)).toBe(req);
        expect(req.getMethod()).toEqual(UrlRequest.POST);
    });

    it('setGetSingleHeader', function(){
        expect(req.setHeaders('X-Test', header)).toBe(req);
        expect(req.getHeaders()['X-Test']).toEqual(header);
    });

    it('setGetHeadersObject', function(){
        expect(req.setHeaders(headers)).toBe(req);
        expect(req.getHeaders()).toEqual(headers);
    });

    it('setGetData', function(){
        expect(req.setData(data)).toBe(req);
        expect(req.getData()).toEqual(data);
    });
});