Makes sure all converters keys are lowercased before any conversion is taking place: dataTypes' names are now truly case insensitive. Unit test edited.
This commit is contained in:
parent
485fa0c42a
commit
7c9a5e6016
2 changed files with 16 additions and 5 deletions
|
@ -2077,12 +2077,12 @@ test("jQuery.ajax - transitive conversions", function() {
|
|||
|
||||
jQuery.ajax( url("data/json.php") , {
|
||||
converters: {
|
||||
"json myjson": function( data ) {
|
||||
"json myJson": function( data ) {
|
||||
ok( true , "converter called" );
|
||||
return data;
|
||||
}
|
||||
},
|
||||
dataType: "myjson",
|
||||
dataType: "myJson",
|
||||
success: function() {
|
||||
ok( true , "Transitive conversion worked" );
|
||||
strictEqual( this.dataTypes[0] , "text" , "response was retrieved as text" );
|
||||
|
@ -2092,13 +2092,13 @@ test("jQuery.ajax - transitive conversions", function() {
|
|||
|
||||
jQuery.ajax( url("data/json.php") , {
|
||||
converters: {
|
||||
"json myjson": function( data ) {
|
||||
"json myJson": function( data ) {
|
||||
ok( true , "converter called (*)" );
|
||||
return data;
|
||||
}
|
||||
},
|
||||
contents: false, /* headers are wrong so we ignore them */
|
||||
dataType: "* myjson",
|
||||
dataType: "* myJson",
|
||||
success: function() {
|
||||
ok( true , "Transitive conversion worked (*)" );
|
||||
strictEqual( this.dataTypes[0] , "text" , "response was retrieved as text (*)" );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue