aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorAndres Ornelas2010-05-25 09:52:52 -0700
committerAndres Ornelas2010-05-25 09:52:52 -0700
commit4fec828cf6ce896452945c1dd8aa2db61e2bc746 (patch)
treee6e2dfe334ee0c259d9b8176bc560b1f4ccba081 /test
parent55c0767f16e60e77e9d1b4d46698ddbf343ed8b1 (diff)
downloadangular.js-4fec828cf6ce896452945c1dd8aa2db61e2bc746.tar.bz2
appended lastDocument to the document.body
Diffstat (limited to 'test')
-rw-r--r--test/scenario/DSLSpec.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/scenario/DSLSpec.js b/test/scenario/DSLSpec.js
index 3c16876d..bed1f008 100644
--- a/test/scenario/DSLSpec.js
+++ b/test/scenario/DSLSpec.js
@@ -11,6 +11,7 @@ describe("DSL", function() {
};
executeStep = function(step, html, callback) {
lastDocument =_jQuery('<div>' + html + '</div>');
+ _jQuery(document.body).append(lastDocument);
var specThis = {
testWindow: window,
testDocument: lastDocument
@@ -32,8 +33,10 @@ describe("DSL", function() {
it('should select', function() {
input('gender').select('female');
expect(lastStep.name).toEqual("Select radio 'gender' to 'female'");
- executeStep(lastStep, '<input type="radio" name="0@gender" value="male"/>' +
+ executeStep(lastStep,
+ '<input type="radio" name="0@gender" value="male" checked/>' +
'<input type="radio" name="0@gender" value="female"/>');
+ expect(lastDocument.find(':radio:checked').length).toEqual(1);
expect(lastDocument.find(':radio:checked').val()).toEqual('female');
});
});