You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by mg...@apache.org on 2016/01/28 14:33:30 UTC

[2/2] wicket git commit: WICKET-6084 ajax request failure handler receives incorrect arguments

WICKET-6084 ajax request failure handler receives incorrect arguments

Add unit tests


Project: http://git-wip-us.apache.org/repos/asf/wicket/repo
Commit: http://git-wip-us.apache.org/repos/asf/wicket/commit/ac21758f
Tree: http://git-wip-us.apache.org/repos/asf/wicket/tree/ac21758f
Diff: http://git-wip-us.apache.org/repos/asf/wicket/diff/ac21758f

Branch: refs/heads/wicket-6.x
Commit: ac21758f358c42322efa9cc28bd0ac6dc26fdb01
Parents: 5add805
Author: Martin Tzvetanov Grigorov <mg...@apache.org>
Authored: Thu Jan 28 14:32:00 2016 +0100
Committer: Martin Tzvetanov Grigorov <mg...@apache.org>
Committed: Thu Jan 28 14:33:16 2016 +0100

----------------------------------------------------------------------
 wicket-core/src/test/js/ajax.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/wicket/blob/ac21758f/wicket-core/src/test/js/ajax.js
----------------------------------------------------------------------
diff --git a/wicket-core/src/test/js/ajax.js b/wicket-core/src/test/js/ajax.js
index fecde0f..2d237fd 100644
--- a/wicket-core/src/test/js/ajax.js
+++ b/wicket-core/src/test/js/ajax.js
@@ -385,7 +385,7 @@ jQuery(document).ready(function() {
 
 		asyncTest('verify arguments to IAjaxCallListener handlers. Failure scenario.', function () {
 
-			expect(10);
+			expect(13);
 
 			var attrs = {
 				u: 'data/ajax/nonExisting.json',
@@ -400,9 +400,12 @@ jQuery(document).ready(function() {
 					}
 				],
 				fh: [
-					function(attributes) {
+					function(attributes, jqXHR, errorMessage, textStatus) {
 						start();
 						equal(attrs.u, attributes.u);
+						ok(typeof(jqXHR.success) === "function", "jqXHR should be passed");
+						equal(errorMessage, "Not Found", "Error message should be passed");
+						equal(textStatus, "error", "Text status should be passed");
 					}
 				],
 				bsh: [