| | 388 | test("load(String, Object, Function)", function() { |
| | 389 | expect(2); |
| | 390 | stop(); |
| | 391 | |
| | 392 | $('<div />').load(url('data/params_html.php'), { foo:3, bar:'ok' }, function() { |
| | 393 | var $post = $(this).find('#post'); |
| | 394 | equals( $post.find('#foo').text(), '3', 'Check if a hash of data is passed correctly'); |
| | 395 | equals( $post.find('#bar').text(), 'ok', 'Check if a hash of data is passed correctly'); |
| | 396 | start(); |
| | 397 | }); |
| | 398 | }); |
| | 399 | |
| | 400 | test("load(String, String, Function)", function() { |
| | 401 | expect(2); |
| | 402 | stop(); |
| | 403 | |
| | 404 | $('<div />').load(url('data/params_html.php'), 'foo=3&bar=ok', function() { |
| | 405 | var $get = $(this).find('#get'); |
| | 406 | equals( $get.find('#foo').text(), '3', 'Check if a string of data is passed correctly'); |
| | 407 | equals( $get.find('#bar').text(), 'ok', 'Check if a of data is passed correctly'); |
| | 408 | start(); |
| | 409 | }); |
| | 410 | }); |
| | 411 | |