Example #1
0
	it("should resolve the blocksDone promise immediately if no includes are found on the page", function(){
		spyOn(EsbPage, 'get_parsed_esb_includes').and.returnValue([]);
		EsbPage.display();
		var promise = EsbPage.blocksDone();

		promise.then(function(value){
			expect(value).toEqual(true);
			done();
		});
	});
Example #2
0
		it ("should parse the includes on the page and render them to the dom", function(done){
			loadFixtures('include.html');
			EsbPage.parse();
			EsbPage.display();
			EsbPage.blocksDone().then(function(){
			    expect($('#jasmine-fixtures h1:contains("Hello Includes!")').length).toEqual(1);
				done();
			}, function(err){
				console.log(err);
			});
		});