@@ -354,6 +354,18 class IssuesControllerTest < ActionController::TestCase | |||||
354 | assert_no_tag :option, :attributes => {:value => '15'}, |
|
354 | assert_no_tag :option, :attributes => {:value => '15'}, | |
355 | :parent => {:tag => 'select', :attributes => {:id => 'issue_priority_id'} } |
|
355 | :parent => {:tag => 'select', :attributes => {:id => 'issue_priority_id'} } | |
356 | end |
|
356 | end | |
|
357 | ||||
|
358 | def test_update_form_should_allow_attachment_upload | |||
|
359 | @request.session[:user_id] = 2 | |||
|
360 | get :show, :id => 1 | |||
|
361 | ||||
|
362 | assert_tag :tag => 'form', | |||
|
363 | :attributes => {:id => 'issue-form', :method => 'post', :enctype => 'multipart/form-data'}, | |||
|
364 | :descendant => { | |||
|
365 | :tag => 'input', | |||
|
366 | :attributes => {:type => 'file', :name => 'attachments[1][file]'} | |||
|
367 | } | |||
|
368 | end | |||
357 |
|
369 | |||
358 | def test_show_should_deny_anonymous_access_without_permission |
|
370 | def test_show_should_deny_anonymous_access_without_permission | |
359 | Role.anonymous.remove_permission!(:view_issues) |
|
371 | Role.anonymous.remove_permission!(:view_issues) | |
@@ -462,6 +474,18 class IssuesControllerTest < ActionController::TestCase | |||||
462 | assert_no_tag :option, :attributes => {:value => '15'}, |
|
474 | assert_no_tag :option, :attributes => {:value => '15'}, | |
463 | :parent => {:tag => 'select', :attributes => {:id => 'issue_priority_id'} } |
|
475 | :parent => {:tag => 'select', :attributes => {:id => 'issue_priority_id'} } | |
464 | end |
|
476 | end | |
|
477 | ||||
|
478 | def test_get_new_form_should_allow_attachment_upload | |||
|
479 | @request.session[:user_id] = 2 | |||
|
480 | get :new, :project_id => 1, :tracker_id => 1 | |||
|
481 | ||||
|
482 | assert_tag :tag => 'form', | |||
|
483 | :attributes => {:id => 'issue-form', :method => 'post', :enctype => 'multipart/form-data'}, | |||
|
484 | :descendant => { | |||
|
485 | :tag => 'input', | |||
|
486 | :attributes => {:type => 'file', :name => 'attachments[1][file]'} | |||
|
487 | } | |||
|
488 | end | |||
465 |
|
489 | |||
466 | def test_get_new_without_tracker_id |
|
490 | def test_get_new_without_tracker_id | |
467 | @request.session[:user_id] = 2 |
|
491 | @request.session[:user_id] = 2 |
General Comments 0
You need to be logged in to leave comments.
Login now