Sha256: 24d459cef305aac3a45b65993b0a14048c2b397690aeffd34ed7f8fe6d3f7944

Contents?: true

Size: 1.39 KB

Versions: 23

Compression:

Stored size: 1.39 KB

Contents

// load the user backbone model and test...
define([
    'js/model/user'
],
function( 
    User 
) {
    // describe the test suite for this module.
    describe("The User represents a user in the system.", function() {

        // create our test user model.
        var user = new User();

        it("should be defined", function() {
            expect( user ).toBeDefined();
        });

        describe("The User object should have the following defined attributes.", function() {

            it("should have a defined url route /user", function() {
                expect( user.url ).toEqual('/user');
            });

        });    

        describe("The User object should have the following defined backbone attributes.", function() {

            it("should have an id", function() {
                expect( user.get('id') ).toBeDefined();
            });

            it("should have an email", function() {
                expect( user.get('email') ).toBeDefined();
            });

            it("should have a firstName", function() {
                expect( user.get('firstName') ).toBeDefined();
            });

            it("should have a lastName", function() {
                expect( user.get('lastName') ).toBeDefined();
            });

            it("should have a lastLogin", function() {
                expect( user.get('lastLogin') ).toBeDefined();
            });

        });
    });
});

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby public/rearview-src/test/spec/model/user.js
rearview-1.2.2.rc.2-jruby public/rearview-src/test/spec/model/user.js
rearview-1.2.2.rc.1-jruby public/rearview-src/test/spec/model/user.js
rearview-1.2.1-jruby public/rearview-src/test/spec/model/user.js
rearview-1.2.0-jruby public/rearview-src/test/spec/model/user.js
rearview-1.1.2-jruby public/rearview-src/test/spec/model/user.js
rearview-1.1.1-jruby public/rearview-src/test/spec/model/user.js
rearview-1.1.0-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.3.rc.4-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.3.rc.3-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.3.rc.2-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.3.rc.1-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.2-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.2.rc.4-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.2.rc.3-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.2.rc.2-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.2.rc.1-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.1-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.0-jruby public/rearview-src/test/spec/model/user.js
rearview-1.0.0.rc5-jruby public/rearview-src/test/spec/model/user.js