diff options
-rw-r--r-- | test/unit/ajax.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/unit/ajax.js b/test/unit/ajax.js index 4ab17e8eb..fc8ed3ef0 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -1704,7 +1704,8 @@ QUnit.module( "ajax", { var done = assert.async(); jQuery.ajax( url( "mock.php?action=status&code=200&text=Hello" ) ).done( function( _, statusText, jqXHR ) { assert.strictEqual( statusText, "success", "callback status text ok for success" ); - assert.ok( jqXHR.statusText === "Hello" || jqXHR.statusText === "OK", "jqXHR status text ok for success (" + jqXHR.statusText + ")" ); + assert.ok( [ "Hello", "OK", "success" ].indexOf( jqXHR.statusText ) > -1, + "jqXHR status text ok for success (" + jqXHR.statusText + ")" ); jQuery.ajax( url( "mock.php?action=status&code=404&text=World" ) ).fail( function( jqXHR, statusText ) { assert.strictEqual( statusText, "error", "callback status text ok for error" ); done(); |