|  |  | @ -1,7 +1,15 @@ | 
			
		
	
		
		
			
				
					
					|  |  |  | define([ |  |  |  | define([ | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   'backbone', | 
			
		
	
		
		
			
				
					
					|  |  |  |   'marionette', |  |  |  |   'marionette', | 
			
		
	
		
		
			
				
					
					|  |  |  |   'core/layout/module' |  |  |  |   'core/layout/module' | 
			
		
	
		
		
			
				
					
					|  |  |  | ], function (Marionette, LayoutModule) { |  |  |  | ], function (Backbone, Marionette, LayoutModule) { | 
			
				
				
			
		
	
		
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   function MockModel() { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |     Backbone.Model.apply(this, arguments); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   } | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   MockModel.prototype = new Backbone.Model(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |   MockModel.prototype.sync = function () {}; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |   describe('LayoutModule', function () { |  |  |  |   describe('LayoutModule', function () { | 
			
		
	
		
		
			
				
					
					|  |  |  |     it('→ exits', function () { |  |  |  |     it('→ exits', function () { | 
			
		
	
		
		
			
				
					
					|  |  |  |       var app = new Marionette.Application(); |  |  |  |       var app = new Marionette.Application(); | 
			
		
	
	
		
		
			
				
					|  |  | @ -10,13 +18,26 @@ define([ | 
			
		
	
		
		
			
				
					
					|  |  |  |     }); |  |  |  |     }); | 
			
		
	
		
		
			
				
					
					|  |  |  | 
 |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |     describe('→ onStart', function () { |  |  |  |     describe('→ onStart', function () { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       var app = null; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       var module = null; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       beforeEach(function () { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         app = new Marionette.Application(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         module = new LayoutModule('layout', app, {}); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         module.Model = MockModel; | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |       it('→ will render view', function () { |  |  |  |       it('→ will render view', function () { | 
			
		
	
		
		
			
				
					
					|  |  |  |         var app = new Marionette.Application(); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         var module = new LayoutModule('layout', app, {}); |  |  |  |  | 
			
		
	
		
		
			
				
					
					|  |  |  |         spyOn(module.View.prototype, 'render'); |  |  |  |         spyOn(module.View.prototype, 'render'); | 
			
		
	
		
		
			
				
					
					|  |  |  |         module.onStart(); |  |  |  |         module.onStart(); | 
			
		
	
		
		
			
				
					
					|  |  |  |         expect(module.View.prototype.render).toHaveBeenCalled(); |  |  |  |         expect(module.View.prototype.render).toHaveBeenCalled(); | 
			
		
	
		
		
			
				
					
					|  |  |  |       }); |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  | 
 | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       it('→ will fetch model', function () { | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         spyOn(module.Model.prototype, 'fetch'); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         module.onStart(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |         expect(module.Model.prototype.fetch).toHaveBeenCalled(); | 
			
		
	
		
		
			
				
					
					|  |  |  |  |  |  |  |       }); | 
			
		
	
		
		
			
				
					
					|  |  |  |     }); |  |  |  |     }); | 
			
		
	
		
		
			
				
					
					|  |  |  |   }); |  |  |  |   }); | 
			
		
	
		
		
			
				
					
					|  |  |  | }); |  |  |  | }); | 
			
		
	
	
		
		
			
				
					|  |  | 
 |