|
|
|
@ -26,31 +26,31 @@ class ContextMenusControllerTest < ActionController::TestCase |
|
|
|
|
:attributes => { :href => '/issues/1/edit', |
|
|
|
|
:class => 'icon-edit' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Closed', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids%5B%5D=1&issue%5Bstatus_id%5D=5', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids[]=1&issue[status_id]=5', |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Immediate', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids%5B%5D=1&issue%5Bpriority_id%5D=8', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids[]=1&issue[priority_id]=8', |
|
|
|
|
:class => '' } |
|
|
|
|
# Versions |
|
|
|
|
assert_tag :tag => 'a', :content => '2.0', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids%5B%5D=1&issue%5Bfixed_version_id%5D=3', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids[]=1&issue[fixed_version_id]=3', |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'eCookbook Subproject 1 - 2.0', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids%5B%5D=1&issue%5Bfixed_version_id%5D=4', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids[]=1&issue[fixed_version_id]=4', |
|
|
|
|
:class => '' } |
|
|
|
|
|
|
|
|
|
assert_tag :tag => 'a', :content => 'Dave Lopper', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids%5B%5D=1&issue%5Bassigned_to_id%5D=3', |
|
|
|
|
:attributes => { :href => '/issues/bulk_edit?ids[]=1&issue[assigned_to_id]=3', |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Duplicate', |
|
|
|
|
:attributes => { :href => '/projects/ecookbook/issues/1/copy', |
|
|
|
|
:class => 'icon-duplicate' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Copy', |
|
|
|
|
:attributes => { :href => '/issues/move/new?copy_options%5Bcopy%5D=t&ids%5B%5D=1' } |
|
|
|
|
:attributes => { :href => '/issues/move/new?copy_options[copy]=t&ids[]=1' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Move', |
|
|
|
|
:attributes => { :href => '/issues/move/new?ids%5B%5D=1'} |
|
|
|
|
:attributes => { :href => '/issues/move/new?ids[]=1'} |
|
|
|
|
assert_tag :tag => 'a', :content => 'Delete', |
|
|
|
|
:attributes => { :href => '/issues/destroy?ids%5B%5D=1' } |
|
|
|
|
:attributes => { :href => '/issues/destroy?ids[]=1' } |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def test_context_menu_one_issue_by_anonymous |
|
|
|
@ -68,21 +68,21 @@ class ContextMenusControllerTest < ActionController::TestCase |
|
|
|
|
assert_not_nil assigns(:issues) |
|
|
|
|
assert_equal [1, 2], assigns(:issues).map(&:id).sort |
|
|
|
|
|
|
|
|
|
ids = assigns(:issues).map(&:id).map {|i| "ids%5B%5D=#{i}"}.join('&') |
|
|
|
|
ids = assigns(:issues).map(&:id).map {|i| "ids[]=#{i}"}.join('&') |
|
|
|
|
assert_tag :tag => 'a', :content => 'Edit', |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}", |
|
|
|
|
:class => 'icon-edit' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Closed', |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue%5Bstatus_id%5D=5", |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue[status_id]=5", |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Immediate', |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue%5Bpriority_id%5D=8", |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue[priority_id]=8", |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Dave Lopper', |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue%5Bassigned_to_id%5D=3", |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue[assigned_to_id]=3", |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Copy', |
|
|
|
|
:attributes => { :href => "/issues/move/new?copy_options%5Bcopy%5D=t&#{ids}"} |
|
|
|
|
:attributes => { :href => "/issues/move/new?copy_options[copy]=t&#{ids}"} |
|
|
|
|
assert_tag :tag => 'a', :content => 'Move', |
|
|
|
|
:attributes => { :href => "/issues/move/new?#{ids}"} |
|
|
|
|
assert_tag :tag => 'a', :content => 'Delete', |
|
|
|
@ -97,18 +97,18 @@ class ContextMenusControllerTest < ActionController::TestCase |
|
|
|
|
assert_not_nil assigns(:issues) |
|
|
|
|
assert_equal [1, 2, 6], assigns(:issues).map(&:id).sort |
|
|
|
|
|
|
|
|
|
ids = assigns(:issues).map(&:id).map {|i| "ids%5B%5D=#{i}"}.join('&') |
|
|
|
|
ids = assigns(:issues).map(&:id).map {|i| "ids[]=#{i}"}.join('&') |
|
|
|
|
assert_tag :tag => 'a', :content => 'Edit', |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}", |
|
|
|
|
:class => 'icon-edit' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Closed', |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue%5Bstatus_id%5D=5", |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue[status_id]=5", |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Immediate', |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue%5Bpriority_id%5D=8", |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue[priority_id]=8", |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'John Smith', |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue%5Bassigned_to_id%5D=2", |
|
|
|
|
:attributes => { :href => "/issues/bulk_edit?#{ids}&issue[assigned_to_id]=2", |
|
|
|
|
:class => '' } |
|
|
|
|
assert_tag :tag => 'a', :content => 'Delete', |
|
|
|
|
:attributes => { :href => "/issues/destroy?#{ids}"} |
|
|
|
|