Skip to content

Commit

Permalink
Now removing Filter plugin elements in teardown
Browse files Browse the repository at this point in the history
  • Loading branch information
aron committed Jun 29, 2011
1 parent 1aa7348 commit 65b7619
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/spec/plugin/filter_spec.coffee
Expand Up @@ -13,13 +13,19 @@ describe "Filter", ->
plugin = new Annotator.Plugin.Filter(element[0])
plugin.annotator = annotator

afterEach ->
plugin.element.remove()

describe "events", ->
filterElement = null

beforeEach ->
filterElement = $(plugin.html.filter)
plugin.element.append(filterElement)

afterEach ->
filterElement.remove()

it "should call Filter#_onFilterFocus when a filter input is focussed", ->
spyOn(plugin, '_onFilterFocus')
filterElement.find('input').focus()
Expand Down

0 comments on commit 65b7619

Please sign in to comment.