Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
jquery
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
夏彬
jquery
Commits
6378a19c
Commit
6378a19c
authored
Nov 28, 2012
by
jaubourg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Unit test for #12004
parent
081c4efc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
ajax.js
test/unit/ajax.js
+34
-0
No files found.
test/unit/ajax.js
View file @
6378a19c
...
@@ -1521,6 +1521,40 @@ module( "ajax", {
...
@@ -1521,6 +1521,40 @@ module( "ajax", {
},
"exception bubbled"
);
},
"exception bubbled"
);
});
});
jQuery
.
each
(
[
"method"
,
"type"
],
function
(
_
,
globalOption
)
{
function
request
(
option
)
{
var
options
=
{
url
:
url
(
"data/echoData.php"
),
data
:
"hello"
,
success
:
function
(
msg
)
{
strictEqual
(
msg
,
"hello"
,
"Check for POST (no override)"
);
}
};
if
(
option
)
{
options
[
option
]
=
"GET"
;
options
.
success
=
function
(
msg
)
{
strictEqual
(
msg
,
""
,
"Check for no POST (overriding with "
+
option
+
")"
);
};
}
return
options
;
}
ajaxTest
(
"#12004 - jQuery.ajax() - method is an alias of type - "
+
globalOption
+
" set globally"
,
3
,
{
setup
:
function
()
{
var
options
=
{};
options
[
globalOption
]
=
"POST"
;
jQuery
.
ajaxSetup
(
options
);
},
requests
:
[
request
(
"type"
),
request
(
"method"
),
request
()
]
});
});
//----------- jQuery.ajaxPrefilter()
//----------- jQuery.ajaxPrefilter()
ajaxTest
(
"jQuery.ajaxPrefilter() - abort"
,
1
,
{
ajaxTest
(
"jQuery.ajaxPrefilter() - abort"
,
1
,
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment