aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/template
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-07-01 08:31:30 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-07-01 08:31:30 +0000
commit5651a69130acfcfadcf0d0eeafe7e7f5ee5ba17b (patch)
treec04655054e576604f458bc4a381ba59eabb679c5 /actionpack/test/template
parentcadcd9e7144394ecc9df01961191d20e5e219a37 (diff)
downloadrails-5651a69130acfcfadcf0d0eeafe7e7f5ee5ba17b.tar.gz
rails-5651a69130acfcfadcf0d0eeafe7e7f5ee5ba17b.tar.bz2
rails-5651a69130acfcfadcf0d0eeafe7e7f5ee5ba17b.zip
Load models and frequency typo on upoad progress #1555 [Sean Treadway]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1580 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/test/template')
-rw-r--r--actionpack/test/template/upload_progress_helper_testx.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/test/template/upload_progress_helper_testx.rb b/actionpack/test/template/upload_progress_helper_testx.rb
index 287516b765..84ee607cbd 100644
--- a/actionpack/test/template/upload_progress_helper_testx.rb
+++ b/actionpack/test/template/upload_progress_helper_testx.rb
@@ -122,14 +122,14 @@ class UploadProgressHelperTest < Test::Unit::TestCase
def test_form_tag_with_upload_progress
assert_equal(
- "<form action=\"http://www.example.com\" enctype=\"multipart/form-data\" method=\"post\" onsubmit=\"if (this.action.indexOf('upload_id') &lt; 0){ this.action += '?upload_id=1'; }this.target = 'UploadTarget1';$('UploadProgressBar1').firstChild.firstChild.style.width='0%';; document.uploadStatus1 = new Ajax.PeriodicalUpdater('UploadStatus1','http://www.example.com',{script:true, onComplete:function(request){$('UploadProgressBar1').firstChild.firstChild.style.width='100%';; }, asynchronous:true}.extend({decay:1.8,freqency:2.0})); return true\"><iframe id=\"UploadTarget1\" name=\"UploadTarget1\" src=\"\" style=\"width:0px;height:0px;border:0\"></iframe>",
+ "<form action=\"http://www.example.com\" enctype=\"multipart/form-data\" method=\"post\" onsubmit=\"if (this.action.indexOf('upload_id') &lt; 0){ this.action += '?upload_id=1'; }this.target = 'UploadTarget1';$('UploadProgressBar1').firstChild.firstChild.style.width='0%';; document.uploadStatus1 = new Ajax.PeriodicalUpdater('UploadStatus1','http://www.example.com',{script:true, onComplete:function(request){$('UploadProgressBar1').firstChild.firstChild.style.width='100%';; }, asynchronous:true}.extend({decay:1.8,frequency:2.0})); return true\"><iframe id=\"UploadTarget1\" name=\"UploadTarget1\" src=\"\" style=\"width:0px;height:0px;border:0\"></iframe>",
form_tag_with_upload_progress
)
end
def test_form_tag_with_upload_progress_custom
assert_equal(
- "<form action=\"http://www.example.com\" enctype=\"multipart/form-data\" method=\"post\" onsubmit=\"if (this.action.indexOf('upload_id') &lt; 0){ this.action += '?upload_id=5'; }this.target = 'awindow';$('UploadProgressBar0').firstChild.firstChild.style.width='0%';; alert('foo'); document.uploadStatus0 = new Ajax.PeriodicalUpdater('UploadStatus0','http://www.example.com',{script:true, onComplete:function(request){$('UploadProgressBar0').firstChild.firstChild.style.width='100%';; alert('bar'); alert('bar')}, asynchronous:true}.extend({decay:7,freqency:6})); return true\" target=\"awindow\">",
+ "<form action=\"http://www.example.com\" enctype=\"multipart/form-data\" method=\"post\" onsubmit=\"if (this.action.indexOf('upload_id') &lt; 0){ this.action += '?upload_id=5'; }this.target = 'awindow';$('UploadProgressBar0').firstChild.firstChild.style.width='0%';; alert('foo'); document.uploadStatus0 = new Ajax.PeriodicalUpdater('UploadStatus0','http://www.example.com',{script:true, onComplete:function(request){$('UploadProgressBar0').firstChild.firstChild.style.width='100%';; alert('bar'); alert('bar')}, asynchronous:true}.extend({decay:7,frequency:6})); return true\" target=\"awindow\">",
form_tag_with_upload_progress({:upload_id => 5}, {:begin => "alert('foo')", :finish => "alert('bar')", :frequency => 6, :decay => 7, :target => 'awindow'})
)
end
@@ -258,14 +258,14 @@ class UploadProgressHelperTest < Test::Unit::TestCase
def test_form_tag_with_upload_progress
assert_equal(
- "<form action=\"http://www.example.com\" enctype=\"multipart/form-data\" method=\"post\" onsubmit=\"if (this.action.indexOf('upload_id') &lt; 0){ this.action += '?upload_id=1'; }this.target = 'UploadTarget1';$('UploadStatus1').innerHTML='Upload starting...'; $('UploadProgressBar1').firstChild.firstChild.style.width='0%'; if (document.uploadStatus1) { document.uploadStatus1.stop(); }document.uploadStatus1 = new Ajax.PeriodicalUpdater('UploadStatus1','http://www.example.com', {onComplete:function(request){$('UploadStatus1').innerHTML='A message';$('UploadProgressBar1').firstChild.firstChild.style.width='100%';document.uploadStatus1 = null}, evalScripts:true, asynchronous:true}.extend({decay:1.8,freqency:2.0})); return true\"><iframe id=\"UploadTarget1\" name=\"UploadTarget1\" src=\"\" style=\"width:0px;height:0px;border:0\"></iframe>",
+ "<form action=\"http://www.example.com\" enctype=\"multipart/form-data\" method=\"post\" onsubmit=\"if (this.action.indexOf('upload_id') &lt; 0){ this.action += '?upload_id=1'; }this.target = 'UploadTarget1';$('UploadStatus1').innerHTML='Upload starting...'; $('UploadProgressBar1').firstChild.firstChild.style.width='0%'; if (document.uploadStatus1) { document.uploadStatus1.stop(); }document.uploadStatus1 = new Ajax.PeriodicalUpdater('UploadStatus1','http://www.example.com', {onComplete:function(request){$('UploadStatus1').innerHTML='A message';$('UploadProgressBar1').firstChild.firstChild.style.width='100%';document.uploadStatus1 = null}, evalScripts:true, asynchronous:true}.extend({decay:1.8,frequency:2.0})); return true\"><iframe id=\"UploadTarget1\" name=\"UploadTarget1\" src=\"\" style=\"width:0px;height:0px;border:0\"></iframe>",
form_tag_with_upload_progress
)
end
def test_form_tag_with_upload_progress_custom
assert_equal(
- "<form action=\"http://www.example.com\" enctype=\"multipart/form-data\" method=\"post\" onsubmit=\"if (this.action.indexOf('upload_id') &lt; 0){ this.action += '?upload_id=5'; }this.target = 'awindow';$('UploadStatus0').innerHTML='Upload starting...'; $('UploadProgressBar0').firstChild.firstChild.style.width='0%'; alert('foo'); if (document.uploadStatus0) { document.uploadStatus0.stop(); }document.uploadStatus0 = new Ajax.PeriodicalUpdater('UploadStatus0','http://www.example.com', {onComplete:function(request){$('UploadStatus0').innerHTML='A message';$('UploadProgressBar0').firstChild.firstChild.style.width='100%';document.uploadStatus0 = null; alert('bar')}, evalScripts:true, asynchronous:true}.extend({decay:7,freqency:6})); return true\" target=\"awindow\">",
+ "<form action=\"http://www.example.com\" enctype=\"multipart/form-data\" method=\"post\" onsubmit=\"if (this.action.indexOf('upload_id') &lt; 0){ this.action += '?upload_id=5'; }this.target = 'awindow';$('UploadStatus0').innerHTML='Upload starting...'; $('UploadProgressBar0').firstChild.firstChild.style.width='0%'; alert('foo'); if (document.uploadStatus0) { document.uploadStatus0.stop(); }document.uploadStatus0 = new Ajax.PeriodicalUpdater('UploadStatus0','http://www.example.com', {onComplete:function(request){$('UploadStatus0').innerHTML='A message';$('UploadProgressBar0').firstChild.firstChild.style.width='100%';document.uploadStatus0 = null; alert('bar')}, evalScripts:true, asynchronous:true}.extend({decay:7,frequency:6})); return true\" target=\"awindow\">",
form_tag_with_upload_progress({:upload_id => 5}, {:begin => "alert('foo')", :finish => "alert('bar')", :frequency => 6, :decay => 7, :target => 'awindow'})
)
end