diff --git a/spec/javascripts/aspect-edit-spec.js b/spec/javascripts/aspect-edit-spec.js index ed03777e1..395ac859a 100644 --- a/spec/javascripts/aspect-edit-spec.js +++ b/spec/javascripts/aspect-edit-spec.js @@ -51,6 +51,26 @@ describe("AspectEdit", function() { }); }); + describe("animateImage", function() { + beforeEach(function() { + $('#jasmine_content').html( +'
  • ' + +' Alexander Hamiltom' + +'
  • ' + ); + }); + it("hides the tipsy ... thingy, whatever that is", function() { + spyOn($.fn, "tipsy"); + AspectEdit.animateImage($('.avatar')); + expect($.fn.tipsy).toHaveBeenCalledWith("hide"); + }); + it("animates the image to make it look larger and slightly opaque", function() { + spyOn($.fn, "animate"); + AspectEdit.animateImage($('.avatar')); + expect($.fn.animate).toHaveBeenCalledWith({'height':80, 'width':80, 'opacity':0.8}, 200); + }); + }); + describe("decrementRequestsCounter", function() { describe("when there is one request", function() { it("removes the counter from the new requests div", function() {