Permalink
Browse files

Fix browser-specific tests

  • Loading branch information...
1 parent 9795fb5 commit 120a34d08290fd281127e04e468103283c495897 @jfirebaugh jfirebaugh committed Aug 24, 2012
Showing with 11 additions and 11 deletions.
  1. +11 −11 test/chai-jquery-spec.js
View
@@ -150,11 +150,11 @@ describe("jQuery assertions", function(){
});
describe("css", function(){
- var subject = $('<div style="background-color:red;position:absolute;"></div>');
+ var subject = $('<div style="position:absolute;"></div>');
describe("when only property name is provided", function(){
it("passes when the element's css has the property", function(){
- subject.should.have.css('background-color');
+ subject.should.have.css('position');
});
it("passes negated when the element's css does not have the property", function(){
@@ -169,22 +169,22 @@ describe("jQuery assertions", function(){
it("fails negated when the element's css has the property", function(){
(function(){
- subject.should.not.have.css('background-color');
- }).should.fail("expected " + inspect(subject) + " not to have a 'background-color' CSS property");
+ subject.should.not.have.css('position');
+ }).should.fail("expected " + inspect(subject) + " not to have a 'position' CSS property");
});
});
describe("when property name and value are provided", function(){
it("passes when the element's css has the property with the given value", function(){
- subject.should.have.css('background-color', 'red');
+ subject.should.have.css('position', 'absolute');
});
it("passes negated when the element's css does not have the given property", function(){
subject.should.not.have.css('display', 'none');
});
it("passes negated when the element's css has the property with a different value", function(){
- subject.should.not.have.css('background-color', 'blue');
+ subject.should.not.have.css('position', 'relative');
});
it("fails when the element's css does not have the property", function(){
@@ -195,19 +195,19 @@ describe("jQuery assertions", function(){
it("fails when the element's css has the property with a different value", function(){
(function(){
- subject.should.have.css('background-color', 'blue');
- }).should.fail("expected " + inspect(subject) + " to have a 'background-color' CSS property with the value 'blue', but the value was 'red'")
+ subject.should.have.css('position', 'relative');
+ }).should.fail("expected " + inspect(subject) + " to have a 'position' CSS property with the value 'relative', but the value was 'absolute'")
});
it("fails negated when the element's css has the property with the given value", function(){
(function(){
- subject.should.not.have.css('background-color', 'red');
- }).should.fail("expected " + inspect(subject) + " not to have a 'background-color' CSS property with the value 'red'")
+ subject.should.not.have.css('position', 'absolute');
+ }).should.fail("expected " + inspect(subject) + " not to have a 'position' CSS property with the value 'absolute'")
});
});
it("chains", function(){
- subject.should.have.css('background-color').equal('red');
+ subject.should.have.css('position').equal('absolute');
});
});

0 comments on commit 120a34d

Please sign in to comment.