@@ -121,7 +121,7 class ContextMenusControllerTest < ActionController::TestCase | |||||
121 | field = IssueCustomField.create!(:name => 'List', :field_format => 'list', |
|
121 | field = IssueCustomField.create!(:name => 'List', :field_format => 'list', | |
122 | :possible_values => ['Foo', 'Bar'], :is_for_all => true, :tracker_ids => [1, 2, 3]) |
|
122 | :possible_values => ['Foo', 'Bar'], :is_for_all => true, :tracker_ids => [1, 2, 3]) | |
123 | @request.session[:user_id] = 2 |
|
123 | @request.session[:user_id] = 2 | |
124 |
get :issues, :ids => [1 |
|
124 | get :issues, :ids => [1] | |
125 |
|
125 | |||
126 | assert_tag 'a', |
|
126 | assert_tag 'a', | |
127 | :content => 'List', |
|
127 | :content => 'List', | |
@@ -130,10 +130,10 class ContextMenusControllerTest < ActionController::TestCase | |||||
130 |
|
130 | |||
131 | assert_tag 'a', |
|
131 | assert_tag 'a', | |
132 | :content => 'Foo', |
|
132 | :content => 'Foo', | |
133 |
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&i |
|
133 | :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=Foo"} | |
134 | assert_tag 'a', |
|
134 | assert_tag 'a', | |
135 | :content => 'none', |
|
135 | :content => 'none', | |
136 |
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&i |
|
136 | :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D="} | |
137 | end |
|
137 | end | |
138 |
|
138 | |||
139 | def test_context_menu_should_not_include_null_value_for_required_custom_fields |
|
139 | def test_context_menu_should_not_include_null_value_for_required_custom_fields | |
@@ -170,7 +170,7 class ContextMenusControllerTest < ActionController::TestCase | |||||
170 | field = IssueCustomField.create!(:name => 'Bool', :field_format => 'bool', |
|
170 | field = IssueCustomField.create!(:name => 'Bool', :field_format => 'bool', | |
171 | :is_for_all => true, :tracker_ids => [1, 2, 3]) |
|
171 | :is_for_all => true, :tracker_ids => [1, 2, 3]) | |
172 | @request.session[:user_id] = 2 |
|
172 | @request.session[:user_id] = 2 | |
173 |
get :issues, :ids => [1 |
|
173 | get :issues, :ids => [1] | |
174 |
|
174 | |||
175 | assert_tag 'a', |
|
175 | assert_tag 'a', | |
176 | :content => 'Bool', |
|
176 | :content => 'Bool', | |
@@ -179,14 +179,14 class ContextMenusControllerTest < ActionController::TestCase | |||||
179 |
|
179 | |||
180 | assert_tag 'a', |
|
180 | assert_tag 'a', | |
181 | :content => 'Yes', |
|
181 | :content => 'Yes', | |
182 |
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&i |
|
182 | :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=1"} | |
183 | end |
|
183 | end | |
184 |
|
184 | |||
185 | def test_context_menu_should_include_user_custom_fields |
|
185 | def test_context_menu_should_include_user_custom_fields | |
186 | field = IssueCustomField.create!(:name => 'User', :field_format => 'user', |
|
186 | field = IssueCustomField.create!(:name => 'User', :field_format => 'user', | |
187 | :is_for_all => true, :tracker_ids => [1, 2, 3]) |
|
187 | :is_for_all => true, :tracker_ids => [1, 2, 3]) | |
188 | @request.session[:user_id] = 2 |
|
188 | @request.session[:user_id] = 2 | |
189 |
get :issues, :ids => [1 |
|
189 | get :issues, :ids => [1] | |
190 |
|
190 | |||
191 | assert_tag 'a', |
|
191 | assert_tag 'a', | |
192 | :content => 'User', |
|
192 | :content => 'User', | |
@@ -195,13 +195,13 class ContextMenusControllerTest < ActionController::TestCase | |||||
195 |
|
195 | |||
196 | assert_tag 'a', |
|
196 | assert_tag 'a', | |
197 | :content => 'John Smith', |
|
197 | :content => 'John Smith', | |
198 |
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&i |
|
198 | :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=2"} | |
199 | end |
|
199 | end | |
200 |
|
200 | |||
201 | def test_context_menu_should_include_version_custom_fields |
|
201 | def test_context_menu_should_include_version_custom_fields | |
202 | field = IssueCustomField.create!(:name => 'Version', :field_format => 'version', :is_for_all => true, :tracker_ids => [1, 2, 3]) |
|
202 | field = IssueCustomField.create!(:name => 'Version', :field_format => 'version', :is_for_all => true, :tracker_ids => [1, 2, 3]) | |
203 | @request.session[:user_id] = 2 |
|
203 | @request.session[:user_id] = 2 | |
204 |
get :issues, :ids => [1 |
|
204 | get :issues, :ids => [1] | |
205 |
|
205 | |||
206 | assert_tag 'a', |
|
206 | assert_tag 'a', | |
207 | :content => 'Version', |
|
207 | :content => 'Version', | |
@@ -210,7 +210,7 class ContextMenusControllerTest < ActionController::TestCase | |||||
210 |
|
210 | |||
211 | assert_tag 'a', |
|
211 | assert_tag 'a', | |
212 | :content => '2.0', |
|
212 | :content => '2.0', | |
213 |
:attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&i |
|
213 | :attributes => {:href => "/issues/bulk_update?ids%5B%5D=1&issue%5Bcustom_field_values%5D%5B#{field.id}%5D=3"} | |
214 | end |
|
214 | end | |
215 |
|
215 | |||
216 | def test_context_menu_by_assignable_user_should_include_assigned_to_me_link |
|
216 | def test_context_menu_by_assignable_user_should_include_assigned_to_me_link |
General Comments 0
You need to be logged in to leave comments.
Login now