Permalink
Browse files

bump bootstrap test dependency to latest 3.3.2

  • Loading branch information...
1 parent df1beb1 commit 1eeb4435d0cf7cc81cd506a198397562292f952f @makeusabrew committed Feb 22, 2015
Showing with 9 additions and 8 deletions.
  1. +1 −1 karma.conf.js
  2. +2 −4 tests/defaults.test.js
  3. +6 −3 tests/dialog.test.coffee
View
@@ -3,6 +3,6 @@ var baseConfig = require("./karma-base.conf");
module.exports = baseConfig({
vendor: [
"tests/vendor/jquery-1.11.2.min.js",
- "tests/vendor/bootstrap-3.0.0.min.js"
+ "tests/vendor/bootstrap-3.3.2.min.js"
]
});
@@ -84,8 +84,7 @@ describe("bootbox.setDefaults", function() {
});
it("adds the large class to the innerDialog", function() {
- expect(this.dialog.children(":first").hasClass("modal-dialog")).to.be.true;
- expect(this.dialog.children(":first").hasClass("modal-lg")).to.be.true;
+ expect(this.dialog.children(".modal-dialog").hasClass("modal-lg")).to.be.true;
});
});
describe("when set to small", function() {
@@ -100,8 +99,7 @@ describe("bootbox.setDefaults", function() {
});
it("adds the small class to the innerDialog", function() {
- expect(this.dialog.children(":first").hasClass("modal-dialog")).to.be.true;
- expect(this.dialog.children(":first").hasClass("modal-sm")).to.be.true;
+ expect(this.dialog.children(".modal-dialog").hasClass("modal-sm")).to.be.true;
});
});
});
@@ -77,7 +77,10 @@ describe "bootbox.dialog", ->
expect(@exists(".modal-footer")).not.to.be.ok
it "has a backdrop", ->
- expect(@dialog.next(".modal-backdrop").length).to.equal 1
+ # bootstrap < 3.3.x
+ # expect(@dialog.next(".modal-backdrop").length).to.equal 1
+ # bootstrap >= 3.3.x
+ expect(@dialog.children(".modal-backdrop").length).to.equal 1
describe "when creating a dialog with a button", ->
beforeEach ->
@@ -334,7 +337,7 @@ describe "bootbox.dialog", ->
size: "large"
it "adds the large class to the innerDialog", ->
- expect(@dialog.children(":first").hasClass("modal-lg")).to.be.true
+ expect(@dialog.children(".modal-dialog").hasClass("modal-lg")).to.be.true
describe "when the size option is set to small", ->
beforeEach ->
@@ -343,4 +346,4 @@ describe "bootbox.dialog", ->
size: "small"
it "adds the large class to the innerDialog", ->
- expect(@dialog.children(":first").hasClass("modal-sm")).to.be.true
+ expect(@dialog.children(".modal-dialog").hasClass("modal-sm")).to.be.true

0 comments on commit 1eeb443

Please sign in to comment.