explicit_url_spec.js 435 Bytes
Newer Older
cahrens committed
1 2 3 4 5 6 7 8 9 10 11 12
define(['js/models/explicit_url'],
    function (Model) {
        describe('Model ', function () {
            it('allows url to be passed in constructor', function () {
                expect(new Model({'explicit_url': '/fancy/url'}).url()).toBe('/fancy/url');
            });
            it('returns empty string if url not set', function () {
                expect(new Model().url()).toBe('');
            });
        });
    }
);