/*global describe, define, beforeEach, it, expect*/
define(['scheduler'], function (SCHEDULER) {

    'use strict';

    var s;

    beforeEach(function () {
        s = new SCHEDULER();
    });

    describe('Scheduler', function () {

        describe('Configurability', function () {

            it('The simulator should start at t = 0', function () {
                expect(s.C.time).toEqual(0);
            });

            it('The simulator should have 4 initial elevators', function () {
                expect(s.C.elevators.length).toEqual(4);
            });

        });

        describe('Initialization', function () {

            it('All the elevators should have a session ID.', function () {
                s.init({
                    session: 'alpha'
                });
                expect(s.C.elevators[0].session).toEqual('alpha');
                expect(s.C.elevators[1].session).toEqual('alpha');
                expect(s.C.elevators[2].session).toEqual('alpha');
                expect(s.C.elevators[3].session).toEqual('alpha');
            });

        });

        describe('Update Log', function () {

            it('When the log is updated the time should be increased by 1.', function () {
                s.init({
                    session: 'alpha'
                });
                s.update_time();
                expect(s.CONFIG.time).toEqual(1);
            });

            it('When the time is updated there should be 4 elements in the log.', function () {
                s.init({
                    session: 'alpha'
                });
                s.update_time();
                expect(s.C.log["t" + 1]).not.toBeUndefined();
                expect(s.C.log["t" + 1]['A']).not.toBeUndefined();
                expect(s.C.log["t" + 1]['B']).not.toBeUndefined();
                expect(s.C.log["t" + 1]['C']).not.toBeUndefined();
                expect(s.C.log["t" + 1]['D']).not.toBeUndefined();
                expect(s.C.log["t" + 1]['A'].floor).toEqual(1);
                expect(s.C.log["t" + 1]['B'].floor).toEqual(1);
                expect(s.C.log["t" + 1]['C'].floor).toEqual(1);
                expect(s.C.log["t" + 1]['D'].floor).toEqual(1);
            });

        });

    });

});
@@ -376,16 +376,24 @@
 ect(s.C.
+current_
 time).to
@@ -402,16 +402,16 @@
 ual(0);%0A
-
         
@@ -512,32 +512,44 @@
          expect(
+Object.keys(
 s.C.elevators.le
@@ -545,16 +545,17 @@
 levators
+)
 .length)
@@ -842,17 +842,45 @@
 evators%5B
-0
+Object.keys(s.C.elevators)%5B0%5D
 %5D.sessio
@@ -937,17 +937,45 @@
 evators%5B
-1
+Object.keys(s.C.elevators)%5B1%5D
 %5D.sessio
@@ -1036,9 +1036,37 @@
 ors%5B
-2
+Object.keys(s.C.elevators)%5B2%5D
 %5D.se
@@ -1131,9 +1131,37 @@
 ors%5B
-3
+Object.keys(s.C.elevators)%5B3%5D
 %5D.se
@@ -1499,16 +1499,24 @@
 .CONFIG.
+current_
 time).to
@@ -1712,32 +1712,32 @@
             %7D);%0A
-
                 
@@ -1742,32 +1742,33 @@
   s.update_time(
+1
 );%0A             

Fix tests.