diff --git a/test/unit/ajax.js b/test/unit/ajax.js index bcb234640..dee96b36d 100644 --- a/test/unit/ajax.js +++ b/test/unit/ajax.js @@ -1627,7 +1627,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();