Skip to content
This repository has been archived by the owner on Jul 26, 2023. It is now read-only.

Commit

Permalink
Merge pull request #201 from craigbrett17/bug-checked-parsererror
Browse files Browse the repository at this point in the history
Fixed bug with HTML5 style booleans causing parsererror
  • Loading branch information
Travis Jeffery committed Feb 7, 2015
2 parents 9e034d5 + 83b0c8e commit 97bc4e3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/jasmine-jquery.js
Expand Up @@ -125,6 +125,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
async: false, // must be synchronous to guarantee that no tests are run before fixture is loaded
cache: false,
url: url,
dataType: 'html',
success: function (data, status, $xhr) {
htmlText = $xhr.responseText
}
Expand Down
6 changes: 6 additions & 0 deletions spec/fixtures/fixture_with_checkbox_with_checked.html
@@ -0,0 +1,6 @@
<div id="anchor_01">
<label>
<input type="checkbox" id="checked-box" checked />
This should render properly
</label>
</div>
9 changes: 9 additions & 0 deletions spec/suites/jasmine-jquery-spec.js
Expand Up @@ -425,6 +425,15 @@ describe("jasmine.Fixtures using real AJAX call", function () {
expect($("#anchor_01").length).toBe(1)
})
})

describe("When the fixture contains a HTML 5 style checked checkbox", function () {
var fixtureUrl = "fixture_with_checkbox_with_checked.html"

it("Then the fixture is loaded successfully", function () {
jasmine.getFixtures().load(fixtureUrl)
expect('#' + jasmine.getFixtures().containerId).toContainElement('#checked-box')
})
})
})

describe("jQuery matcher", function () {
Expand Down

0 comments on commit 97bc4e3

Please sign in to comment.