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

Commit

Permalink
Merge pull request #313 from amco/image_tests
Browse files Browse the repository at this point in the history
Bring back tests for Image
  • Loading branch information
assaf committed Apr 6, 2012
2 parents 058cf98 + 2d1fa15 commit 5265e38
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions spec/script_spec.coffee
Expand Up @@ -317,15 +317,13 @@ Vows.describe("Scripts").addBatch
"should run scripts with file url src": (browser)->
assert.equal browser.document.title, "file://"

###
.addBatch

"new Image":
Browser.wants "http://localhost:3003/script/living"
"should construct an img tag": (browser)-> assert.equal domToHtml(browser.evaluate("new Image")), "<img>\r\n"
"should construct an img tag": (browser)->
assert.equal browser.evaluate("new Image").tagName, "IMG"
"should construct an img tag with width and height": (browser)->
assert.equal domToHtml(browser.evaluate("new Image(1, 1)")), "<img width=\"1\" height=\"1\">\r\n"
###
assert.equal browser.evaluate("new Image(1, 1)").height, 1


.export(module)

0 comments on commit 5265e38

Please sign in to comment.