Merged ajax_upload branch (#3957).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10977 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2012-12-10 20:09:41 +00:00
parent 2304f5d42c
commit ef25210aca
22 changed files with 442 additions and 83 deletions
+6 -7
View File
@@ -1000,7 +1000,7 @@ class IssuesControllerTest < ActionController::TestCase
get :show, :id => 1
assert_select 'form#issue-form[method=post][enctype=multipart/form-data]' do
assert_select 'input[type=file][name=?]', 'attachments[1][file]'
assert_select 'input[type=file][name=?]', 'attachments_files'
end
end
@@ -1569,8 +1569,7 @@ class IssuesControllerTest < ActionController::TestCase
get :new, :project_id => 1, :tracker_id => 1
assert_select 'form[id=issue-form][method=post][enctype=multipart/form-data]' do
assert_select 'input[name=?][type=file]', 'attachments[1][file]'
assert_select 'input[name=?][maxlength=255]', 'attachments[1][description]'
assert_select 'input[name=?][type=file]', 'attachments_files'
end
end
@@ -2165,7 +2164,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_nil attachment.container
assert_tag 'input', :attributes => {:name => 'attachments[p0][token]', :value => attachment.token}
assert_tag 'span', :content => /testfile.txt/
assert_tag 'input', :attributes => {:name => 'attachments[p0][filename]', :value => 'testfile.txt'}
end
def test_post_create_with_failure_should_keep_saved_attachments
@@ -2184,7 +2183,7 @@ class IssuesControllerTest < ActionController::TestCase
end
assert_tag 'input', :attributes => {:name => 'attachments[p0][token]', :value => attachment.token}
assert_tag 'span', :content => /testfile.txt/
assert_tag 'input', :attributes => {:name => 'attachments[p0][filename]', :value => 'testfile.txt'}
end
def test_post_create_should_attach_saved_attachments
@@ -2967,7 +2966,7 @@ class IssuesControllerTest < ActionController::TestCase
assert_nil attachment.container
assert_tag 'input', :attributes => {:name => 'attachments[p0][token]', :value => attachment.token}
assert_tag 'span', :content => /testfile.txt/
assert_tag 'input', :attributes => {:name => 'attachments[p0][filename]', :value => 'testfile.txt'}
end
def test_put_update_with_failure_should_keep_saved_attachments
@@ -2986,7 +2985,7 @@ class IssuesControllerTest < ActionController::TestCase
end
assert_tag 'input', :attributes => {:name => 'attachments[p0][token]', :value => attachment.token}
assert_tag 'span', :content => /testfile.txt/
assert_tag 'input', :attributes => {:name => 'attachments[p0][filename]', :value => 'testfile.txt'}
end
def test_put_update_should_attach_saved_attachments