Permalink
Browse files

fixed some specs

  • Loading branch information...
1 parent 2c79c85 commit 2d6fd6c4b94ae8799c58376abde67e07dcbfa6d3 @wilkerlucio committed Aug 9, 2011
Showing with 10 additions and 14 deletions.
  1. +10 −14 spec/unit/form_spec.js
View
@@ -41,37 +41,33 @@ describe "jCheck"
describe "notifiers setup"
it "should user notification_dialog and tip_ballons as default notifiers"
v = $(fixture("form")).jcheck()
- v.should.have 1, 'notifiers'
- v.should.have 1, 'live_notifiers'
- v.notifiers[0].should.be_an $.FormCheck.Notifiers.NotificationDialog
- v.live_notifiers[0].should.be_an $.FormCheck.Notifiers.TipBalloons
+ v.options.should.have 1, 'notifiers'
+ v.options.should.have 1, 'live_notifiers'
end
it "should be able to customize overall notifiers on creation"
v = $(fixture("form")).jcheck({notifiers: []})
- v.should.have 0, 'notifiers'
- v.should.have 1, 'live_notifiers'
- v.live_notifiers[0].should.be_an $.FormCheck.Notifiers.TipBalloons
+ v.options.should.have 0, 'notifiers'
+ v.options.should.have 1, 'live_notifiers'
end
it "should be able to customize live notifiers on creation"
v = $(fixture("form")).jcheck({live_notifiers: []})
- v.should.have 1, 'notifiers'
- v.should.have 0, 'live_notifiers'
- v.notifiers[0].should.be_an $.FormCheck.Notifiers.NotificationDialog
+ v.options.should.have 1, 'notifiers'
+ v.options.should.have 0, 'live_notifiers'
end
it "should be able to customize both kind notifiers at once"
v = $(fixture("form")).jcheck({notifiers: [], live_notifiers: []})
- v.should.have 0, 'notifiers'
- v.should.have 0, 'live_notifiers'
+ v.options.should.have 0, 'notifiers'
+ v.options.should.have 0, 'live_notifiers'
end
it "should be able to customize default overall notifiers"
jQuery.FormCheck.default_notifiers = []
v = $(fixture("form")).jcheck()
- v.should.have 0, 'notifiers'
+ v.options.should.have 0, 'notifiers'
jQuery.FormCheck.default_notifiers = ["notification_dialog"]
end
@@ -80,7 +76,7 @@ describe "jCheck"
jQuery.FormCheck.default_live_notifiers = []
v = $(fixture("form")).jcheck()
- v.should.have 0, 'live_notifiers'
+ v.options.should.have 0, 'live_notifiers'
jQuery.FormCheck.default_live_notifiers = ["tip_balloons"]
end

0 comments on commit 2d6fd6c

Please sign in to comment.