Permalink
Browse files

Adds failing test to support issue

  • Loading branch information...
1 parent 97ae988 commit 241c7481f9247327152a6e6a4aecc7ee735026b6 @rwaldron rwaldron committed Jul 22, 2011
Showing with 31 additions and 7 deletions.
  1. +17 −7 test/index.html
  2. +14 −0 test/unit/jquery.serializeObject.js
View
@@ -2,18 +2,28 @@
<html>
<head>
<meta charset="UTF-8" />
- <title>QUnit Test Suite</title>
- <link rel="stylesheet" href="../qunit/qunit.css" type="text/css" media="screen">
- <script type="text/javascript" src="../qunit/qunit.js"></script>
- <script type="text/javascript" src="test.js"></script>
- <script type="text/javascript" src="same.js"></script>
+ <title>jQuery.fn.serializeObject Test Suite</title>
+ <link rel="stylesheet" href="../qunit/qunit.css" media="screen">
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script>
+ <script src="../qunit/qunit.js"></script>
+ <script src="../jquery.serializeObject.js"></script>
+ <script src="unit/jquery.serializeObject.js"></script>
</head>
<body>
- <h1 id="qunit-header">QUnit Test Suite</h1>
+ <h1 id="qunit-header">jQuery.fn.serializeObject QUnit Test Suite</h1>
<h2 id="qunit-banner"></h2>
<div id="qunit-testrunner-toolbar"></div>
<h2 id="qunit-userAgent"></h2>
<ol id="qunit-tests"></ol>
- <div id="qunit-fixture">test markup</div>
+ <div id="qunit-fixture">
+
+ <form id="test-form" name="test-form">
+
+ <input type="text" placeholder="Email" name="name" id="name" value="dude" />
+ <input type="password" placeholder="Password" name="password" id="password" value="seriously" />
+ <input type="submit" value="Sign In">
+
+ </form>
+ </div>
</body>
</html>
@@ -0,0 +1,14 @@
+
+// Supporting Issue #1
+test("Serialize elements with a name property", function() {
+
+
+ expect( 1 );
+
+ var looksLike = {
+ name: "dude",
+ password: "seriously"
+ };
+
+ deepEqual( $("#test-form").serializeObject(), looksLike, "jQuery.fn.serializeObject() serializes elements with name property" );
+});

0 comments on commit 241c748

Please sign in to comment.