/* Copyright (c) 2010-2011, Diaspora Inc. This file is * licensed under the Affero General Public License version 3 or later. See * the COPYRIGHT file. */ describe("View", function() { it("is the object that helps the UI", function() { expect(typeof View === "object").toBeTruthy(); }); describe("publisher", function() { beforeEach(function() { $("#jasmine_content").html( '
' + '
' + '' + '
' + '
' ); }); }); describe("search", function() { beforeEach(function() { $("#jasmine_content").html( '' ); }); describe("focus", function() { it("adds the class 'active' when the user focuses the text field", function() { View.initialize(); $(View.search.selector).focus(); expect($(View.search.selector)).toHaveClass("active"); }); }); describe("blur", function() { it("removes the class 'active' when the user blurs the text field", function() { View.initialize(); $(View.search.selector).focus().blur(); expect($(View.search.selector)).not.toHaveClass("active"); }); }); }); });