backbone-model-overlay.spec.js 845 Bytes
define(function(require) {
    'use strict';

    var $ = require('jquery');
    window.jQuery = $;
    var _ = require('underscore');
    var Backbone = require('backbone');
    var BackboneModelOverlay = require('backbone-model-overlay');

    describe('BackboneModelOverlay', function() {
        it('exists', function() {
            expect(BackboneModelOverlay).toBeDefined();
        });
    });
    describe('BackboneModelOverlay', function() {
        var model;
        beforeEach(function() {
            model = new BackboneModelOverlay();
        });
        describe('empty', function() {
            it('get', function() {
                expect(model.get('missing')).toBeUndefined();
            });
            it('toJSON', function() {
                expect(model.toJSON()).toEqual({});
            });
        });
    });
});