| 
					
				 | 
			
			
				@@ -210,6 +210,19 @@ describe('Application life cycle test', function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     it('has correct htaccess', checkHtaccess); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     it('can access permalink', checkPermalink); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    it('runs cron jobs', function (done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        console.log('sleeping for a minute to ensure that cron job has run'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        setTimeout(function () { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            var logs = execSync('cloudron logs --lines 1000 --app ' + app.id).toString('utf8'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            if (logs.indexOf('Executed the cron event \'wp_version_check\'') !== -1) return done(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            console.log(logs); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            done(new Error('cron jobs are possibly not running')); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+        }, 60 * 1000); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    }); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     it('can restart app', function (done) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         execSync('cloudron restart --wait'); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         done(); 
			 |