redmine_extensions 0.1.11 → 0.1.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2024) hide show
  1. checksums.yaml +4 -4
  2. data/Rakefile +0 -6
  3. data/app/assets/javascripts/redmine_extensions/jquery.entityarray.js +1 -1
  4. data/app/assets/javascripts/redmine_extensions/redmine_extensions.js +6 -2
  5. data/app/views/common/_closing_modal.html.erb +2 -2
  6. data/app/views/common/close_modal.js.erb +4 -4
  7. data/lib/generators/redmine_extensions/entity/templates/_sidebar.html.erb.erb +8 -8
  8. data/lib/generators/redmine_extensions/entity/templates/context_menu.html.erb.erb +7 -7
  9. data/lib/generators/redmine_extensions/entity/templates/custom_field.rb.erb +7 -7
  10. data/lib/generators/redmine_extensions/entity/templates/edit.html.erb.erb +18 -18
  11. data/lib/generators/redmine_extensions/entity/templates/edit.js.erb.erb +16 -16
  12. data/lib/generators/redmine_extensions/entity/templates/index.api.rsb.erb +5 -5
  13. data/lib/generators/redmine_extensions/entity/templates/index.html.erb.erb +4 -4
  14. data/lib/generators/redmine_extensions/entity/templates/index.js.erb.erb +10 -10
  15. data/lib/generators/redmine_extensions/entity/templates/mail_added.html.erb.erb +1 -1
  16. data/lib/generators/redmine_extensions/entity/templates/mail_added.text.erb.erb +2 -2
  17. data/lib/generators/redmine_extensions/entity/templates/mail_updated.text.erb.erb +2 -2
  18. data/lib/generators/redmine_extensions/entity/templates/migration.rb.erb +9 -9
  19. data/lib/generators/redmine_extensions/entity/templates/new.html.erb.erb +18 -18
  20. data/lib/generators/redmine_extensions/entity/templates/new.js.erb.erb +16 -16
  21. data/lib/generators/redmine_extensions/entity/templates/routes.rb.erb +12 -12
  22. data/lib/generators/redmine_extensions/entity/templates/show.html.erb.erb +37 -37
  23. data/lib/generators/redmine_extensions/entity/templates/show.js.erb.erb +10 -10
  24. data/lib/redmine_extensions/engine.rb +1 -0
  25. data/lib/redmine_extensions/redmine_patches/patches.rb +1 -1
  26. data/lib/redmine_extensions/version.rb +1 -1
  27. metadata +23 -3997
  28. data/app/assets/javascripts/redmine_extensions/redmine_extensions.js.orig +0 -648
  29. data/app/helpers/redmine_extensions/application_helper.rb.orig +0 -189
  30. data/app/views/easy_entity_assignments/_query_index.html.erb.orig +0 -16
  31. data/config/database.yml +0 -15
  32. data/lib/redmine_extensions/redmine_patches/controllers/issues_controller_patch.rb +0 -9
  33. data/lib/redmine_extensions/version.rb.orig +0 -7
  34. data/spec/redmine/CONTRIBUTING.md +0 -8
  35. data/spec/redmine/Gemfile +0 -109
  36. data/spec/redmine/README.rdoc +0 -5
  37. data/spec/redmine/Rakefile +0 -7
  38. data/spec/redmine/app/controllers/account_controller.rb +0 -354
  39. data/spec/redmine/app/controllers/activities_controller.rb +0 -77
  40. data/spec/redmine/app/controllers/admin_controller.rb +0 -84
  41. data/spec/redmine/app/controllers/application_controller.rb +0 -662
  42. data/spec/redmine/app/controllers/attachments_controller.rb +0 -191
  43. data/spec/redmine/app/controllers/auth_sources_controller.rb +0 -97
  44. data/spec/redmine/app/controllers/auto_completes_controller.rb +0 -44
  45. data/spec/redmine/app/controllers/boards_controller.rb +0 -111
  46. data/spec/redmine/app/controllers/calendars_controller.rb +0 -56
  47. data/spec/redmine/app/controllers/comments_controller.rb +0 -53
  48. data/spec/redmine/app/controllers/context_menus_controller.rb +0 -97
  49. data/spec/redmine/app/controllers/custom_fields_controller.rb +0 -88
  50. data/spec/redmine/app/controllers/documents_controller.rb +0 -95
  51. data/spec/redmine/app/controllers/email_addresses_controller.rb +0 -106
  52. data/spec/redmine/app/controllers/enumerations_controller.rb +0 -96
  53. data/spec/redmine/app/controllers/files_controller.rb +0 -62
  54. data/spec/redmine/app/controllers/gantts_controller.rb +0 -48
  55. data/spec/redmine/app/controllers/groups_controller.rb +0 -149
  56. data/spec/redmine/app/controllers/issue_categories_controller.rb +0 -122
  57. data/spec/redmine/app/controllers/issue_relations_controller.rb +0 -92
  58. data/spec/redmine/app/controllers/issue_statuses_controller.rb +0 -81
  59. data/spec/redmine/app/controllers/issues_controller.rb +0 -517
  60. data/spec/redmine/app/controllers/journals_controller.rb +0 -109
  61. data/spec/redmine/app/controllers/mail_handler_controller.rb +0 -44
  62. data/spec/redmine/app/controllers/members_controller.rb +0 -129
  63. data/spec/redmine/app/controllers/messages_controller.rb +0 -142
  64. data/spec/redmine/app/controllers/my_controller.rb +0 -211
  65. data/spec/redmine/app/controllers/news_controller.rb +0 -111
  66. data/spec/redmine/app/controllers/previews_controller.rb +0 -53
  67. data/spec/redmine/app/controllers/principal_memberships_controller.rb +0 -80
  68. data/spec/redmine/app/controllers/project_enumerations_controller.rb +0 -42
  69. data/spec/redmine/app/controllers/projects_controller.rb +0 -234
  70. data/spec/redmine/app/controllers/queries_controller.rb +0 -128
  71. data/spec/redmine/app/controllers/reports_controller.rb +0 -95
  72. data/spec/redmine/app/controllers/repositories_controller.rb +0 -439
  73. data/spec/redmine/app/controllers/roles_controller.rb +0 -110
  74. data/spec/redmine/app/controllers/search_controller.rb +0 -87
  75. data/spec/redmine/app/controllers/settings_controller.rb +0 -76
  76. data/spec/redmine/app/controllers/sys_controller.rb +0 -81
  77. data/spec/redmine/app/controllers/timelog_controller.rb +0 -281
  78. data/spec/redmine/app/controllers/trackers_controller.rb +0 -101
  79. data/spec/redmine/app/controllers/users_controller.rb +0 -190
  80. data/spec/redmine/app/controllers/versions_controller.rb +0 -182
  81. data/spec/redmine/app/controllers/watchers_controller.rb +0 -131
  82. data/spec/redmine/app/controllers/welcome_controller.rb +0 -30
  83. data/spec/redmine/app/controllers/wiki_controller.rb +0 -367
  84. data/spec/redmine/app/controllers/wikis_controller.rb +0 -36
  85. data/spec/redmine/app/controllers/workflows_controller.rb +0 -142
  86. data/spec/redmine/app/helpers/account_helper.rb +0 -21
  87. data/spec/redmine/app/helpers/activities_helper.rb +0 -33
  88. data/spec/redmine/app/helpers/admin_helper.rb +0 -35
  89. data/spec/redmine/app/helpers/application_helper.rb +0 -1335
  90. data/spec/redmine/app/helpers/attachments_helper.rb +0 -69
  91. data/spec/redmine/app/helpers/auth_sources_helper.rb +0 -24
  92. data/spec/redmine/app/helpers/boards_helper.rb +0 -41
  93. data/spec/redmine/app/helpers/calendars_helper.rb +0 -58
  94. data/spec/redmine/app/helpers/context_menus_helper.rb +0 -50
  95. data/spec/redmine/app/helpers/custom_fields_helper.rb +0 -166
  96. data/spec/redmine/app/helpers/documents_helper.rb +0 -21
  97. data/spec/redmine/app/helpers/email_addresses_helper.rb +0 -38
  98. data/spec/redmine/app/helpers/enumerations_helper.rb +0 -21
  99. data/spec/redmine/app/helpers/gantt_helper.rb +0 -43
  100. data/spec/redmine/app/helpers/groups_helper.rb +0 -46
  101. data/spec/redmine/app/helpers/issue_categories_helper.rb +0 -21
  102. data/spec/redmine/app/helpers/issue_relations_helper.rb +0 -25
  103. data/spec/redmine/app/helpers/issue_statuses_helper.rb +0 -21
  104. data/spec/redmine/app/helpers/issues_helper.rb +0 -516
  105. data/spec/redmine/app/helpers/journals_helper.rb +0 -46
  106. data/spec/redmine/app/helpers/mail_handler_helper.rb +0 -21
  107. data/spec/redmine/app/helpers/members_helper.rb +0 -38
  108. data/spec/redmine/app/helpers/messages_helper.rb +0 -21
  109. data/spec/redmine/app/helpers/my_helper.rb +0 -77
  110. data/spec/redmine/app/helpers/news_helper.rb +0 -21
  111. data/spec/redmine/app/helpers/principal_memberships_helper.rb +0 -56
  112. data/spec/redmine/app/helpers/projects_helper.rb +0 -115
  113. data/spec/redmine/app/helpers/queries_helper.rb +0 -223
  114. data/spec/redmine/app/helpers/reports_helper.rb +0 -43
  115. data/spec/redmine/app/helpers/repositories_helper.rb +0 -310
  116. data/spec/redmine/app/helpers/roles_helper.rb +0 -21
  117. data/spec/redmine/app/helpers/routes_helper.rb +0 -69
  118. data/spec/redmine/app/helpers/search_helper.rb +0 -69
  119. data/spec/redmine/app/helpers/settings_helper.rb +0 -171
  120. data/spec/redmine/app/helpers/sort_helper.rb +0 -261
  121. data/spec/redmine/app/helpers/timelog_helper.rb +0 -135
  122. data/spec/redmine/app/helpers/trackers_helper.rb +0 -21
  123. data/spec/redmine/app/helpers/users_helper.rb +0 -60
  124. data/spec/redmine/app/helpers/versions_helper.rb +0 -76
  125. data/spec/redmine/app/helpers/watchers_helper.rb +0 -78
  126. data/spec/redmine/app/helpers/welcome_helper.rb +0 -21
  127. data/spec/redmine/app/helpers/wiki_helper.rb +0 -54
  128. data/spec/redmine/app/helpers/workflows_helper.rb +0 -95
  129. data/spec/redmine/app/models/attachment.rb +0 -376
  130. data/spec/redmine/app/models/auth_source.rb +0 -93
  131. data/spec/redmine/app/models/auth_source_ldap.rb +0 -196
  132. data/spec/redmine/app/models/board.rb +0 -96
  133. data/spec/redmine/app/models/change.rb +0 -34
  134. data/spec/redmine/app/models/changeset.rb +0 -294
  135. data/spec/redmine/app/models/comment.rb +0 -38
  136. data/spec/redmine/app/models/custom_field.rb +0 -283
  137. data/spec/redmine/app/models/custom_field_value.rb +0 -56
  138. data/spec/redmine/app/models/custom_value.rb +0 -50
  139. data/spec/redmine/app/models/document.rb +0 -75
  140. data/spec/redmine/app/models/document_category.rb +0 -40
  141. data/spec/redmine/app/models/document_category_custom_field.rb +0 -22
  142. data/spec/redmine/app/models/document_custom_field.rb +0 -22
  143. data/spec/redmine/app/models/email_address.rb +0 -54
  144. data/spec/redmine/app/models/enabled_module.rb +0 -40
  145. data/spec/redmine/app/models/enumeration.rb +0 -142
  146. data/spec/redmine/app/models/group.rb +0 -117
  147. data/spec/redmine/app/models/group_anonymous.rb +0 -26
  148. data/spec/redmine/app/models/group_builtin.rb +0 -56
  149. data/spec/redmine/app/models/group_custom_field.rb +0 -22
  150. data/spec/redmine/app/models/group_non_member.rb +0 -26
  151. data/spec/redmine/app/models/issue.rb +0 -1650
  152. data/spec/redmine/app/models/issue_category.rb +0 -49
  153. data/spec/redmine/app/models/issue_custom_field.rb +0 -45
  154. data/spec/redmine/app/models/issue_priority.rb +0 -68
  155. data/spec/redmine/app/models/issue_priority_custom_field.rb +0 -23
  156. data/spec/redmine/app/models/issue_query.rb +0 -540
  157. data/spec/redmine/app/models/issue_relation.rb +0 -215
  158. data/spec/redmine/app/models/issue_status.rb +0 -123
  159. data/spec/redmine/app/models/journal.rb +0 -305
  160. data/spec/redmine/app/models/journal_detail.rb +0 -50
  161. data/spec/redmine/app/models/mail_handler.rb +0 -565
  162. data/spec/redmine/app/models/mailer.rb +0 -538
  163. data/spec/redmine/app/models/member.rb +0 -198
  164. data/spec/redmine/app/models/member_role.rb +0 -80
  165. data/spec/redmine/app/models/message.rb +0 -121
  166. data/spec/redmine/app/models/news.rb +0 -98
  167. data/spec/redmine/app/models/principal.rb +0 -162
  168. data/spec/redmine/app/models/project.rb +0 -1007
  169. data/spec/redmine/app/models/project_custom_field.rb +0 -22
  170. data/spec/redmine/app/models/query.rb +0 -904
  171. data/spec/redmine/app/models/repository.rb +0 -510
  172. data/spec/redmine/app/models/repository/bazaar.rb +0 -124
  173. data/spec/redmine/app/models/repository/cvs.rb +0 -213
  174. data/spec/redmine/app/models/repository/darcs.rb +0 -114
  175. data/spec/redmine/app/models/repository/filesystem.rb +0 -50
  176. data/spec/redmine/app/models/repository/git.rb +0 -263
  177. data/spec/redmine/app/models/repository/mercurial.rb +0 -211
  178. data/spec/redmine/app/models/repository/subversion.rb +0 -117
  179. data/spec/redmine/app/models/role.rb +0 -233
  180. data/spec/redmine/app/models/setting.rb +0 -276
  181. data/spec/redmine/app/models/time_entry.rb +0 -160
  182. data/spec/redmine/app/models/time_entry_activity.rb +0 -38
  183. data/spec/redmine/app/models/time_entry_activity_custom_field.rb +0 -22
  184. data/spec/redmine/app/models/time_entry_custom_field.rb +0 -23
  185. data/spec/redmine/app/models/time_entry_query.rb +0 -140
  186. data/spec/redmine/app/models/token.rb +0 -85
  187. data/spec/redmine/app/models/tracker.rb +0 -114
  188. data/spec/redmine/app/models/user.rb +0 -862
  189. data/spec/redmine/app/models/user_custom_field.rb +0 -23
  190. data/spec/redmine/app/models/user_preference.rb +0 -62
  191. data/spec/redmine/app/models/version.rb +0 -300
  192. data/spec/redmine/app/models/version_custom_field.rb +0 -22
  193. data/spec/redmine/app/models/watcher.rb +0 -81
  194. data/spec/redmine/app/models/wiki.rb +0 -106
  195. data/spec/redmine/app/models/wiki_content.rb +0 -168
  196. data/spec/redmine/app/models/wiki_page.rb +0 -299
  197. data/spec/redmine/app/models/wiki_redirect.rb +0 -39
  198. data/spec/redmine/app/models/workflow_permission.rb +0 -68
  199. data/spec/redmine/app/models/workflow_rule.rb +0 -74
  200. data/spec/redmine/app/models/workflow_transition.rb +0 -85
  201. data/spec/redmine/app/views/account/login.html.erb +0 -47
  202. data/spec/redmine/app/views/account/logout.html.erb +0 -3
  203. data/spec/redmine/app/views/account/lost_password.html.erb +0 -11
  204. data/spec/redmine/app/views/account/password_recovery.html.erb +0 -20
  205. data/spec/redmine/app/views/account/register.html.erb +0 -34
  206. data/spec/redmine/app/views/activities/index.html.erb +0 -68
  207. data/spec/redmine/app/views/admin/_menu.html.erb +0 -3
  208. data/spec/redmine/app/views/admin/_no_data.html.erb +0 -8
  209. data/spec/redmine/app/views/admin/index.html.erb +0 -8
  210. data/spec/redmine/app/views/admin/info.html.erb +0 -19
  211. data/spec/redmine/app/views/admin/plugins.html.erb +0 -63
  212. data/spec/redmine/app/views/admin/projects.html.erb +0 -43
  213. data/spec/redmine/app/views/attachments/_form.html.erb +0 -31
  214. data/spec/redmine/app/views/attachments/_links.html.erb +0 -38
  215. data/spec/redmine/app/views/attachments/destroy.js.erb +0 -1
  216. data/spec/redmine/app/views/attachments/diff.html.erb +0 -22
  217. data/spec/redmine/app/views/attachments/edit.html.erb +0 -30
  218. data/spec/redmine/app/views/attachments/file.html.erb +0 -17
  219. data/spec/redmine/app/views/attachments/show.api.rsb +0 -1
  220. data/spec/redmine/app/views/attachments/upload.api.rsb +0 -3
  221. data/spec/redmine/app/views/attachments/upload.js.erb +0 -14
  222. data/spec/redmine/app/views/auth_sources/_form.html.erb +0 -6
  223. data/spec/redmine/app/views/auth_sources/_form_auth_source_ldap.html.erb +0 -24
  224. data/spec/redmine/app/views/auth_sources/edit.html.erb +0 -6
  225. data/spec/redmine/app/views/auth_sources/index.html.erb +0 -31
  226. data/spec/redmine/app/views/auth_sources/new.html.erb +0 -7
  227. data/spec/redmine/app/views/auto_completes/issues.html.erb +0 -7
  228. data/spec/redmine/app/views/boards/_form.html.erb +0 -9
  229. data/spec/redmine/app/views/boards/edit.html.erb +0 -6
  230. data/spec/redmine/app/views/boards/index.html.erb +0 -38
  231. data/spec/redmine/app/views/boards/new.html.erb +0 -6
  232. data/spec/redmine/app/views/boards/show.html.erb +0 -66
  233. data/spec/redmine/app/views/calendars/show.html.erb +0 -45
  234. data/spec/redmine/app/views/common/_calendar.html.erb +0 -32
  235. data/spec/redmine/app/views/common/_diff.html.erb +0 -68
  236. data/spec/redmine/app/views/common/_file.html.erb +0 -18
  237. data/spec/redmine/app/views/common/_preview.html.erb +0 -3
  238. data/spec/redmine/app/views/common/_tabs.html.erb +0 -26
  239. data/spec/redmine/app/views/common/error.html.erb +0 -8
  240. data/spec/redmine/app/views/common/error_messages.api.rsb +0 -5
  241. data/spec/redmine/app/views/common/feed.atom.builder +0 -32
  242. data/spec/redmine/app/views/context_menus/issues.html.erb +0 -139
  243. data/spec/redmine/app/views/context_menus/time_entries.html.erb +0 -47
  244. data/spec/redmine/app/views/custom_fields/_form.html.erb +0 -114
  245. data/spec/redmine/app/views/custom_fields/_index.html.erb +0 -30
  246. data/spec/redmine/app/views/custom_fields/edit.html.erb +0 -7
  247. data/spec/redmine/app/views/custom_fields/formats/_bool.html.erb +0 -3
  248. data/spec/redmine/app/views/custom_fields/formats/_date.html.erb +0 -3
  249. data/spec/redmine/app/views/custom_fields/formats/_link.html.erb +0 -3
  250. data/spec/redmine/app/views/custom_fields/formats/_list.html.erb +0 -7
  251. data/spec/redmine/app/views/custom_fields/formats/_numeric.html.erb +0 -3
  252. data/spec/redmine/app/views/custom_fields/formats/_regexp.html.erb +0 -9
  253. data/spec/redmine/app/views/custom_fields/formats/_string.html.erb +0 -4
  254. data/spec/redmine/app/views/custom_fields/formats/_text.html.erb +0 -3
  255. data/spec/redmine/app/views/custom_fields/formats/_user.html.erb +0 -24
  256. data/spec/redmine/app/views/custom_fields/formats/_version.html.erb +0 -24
  257. data/spec/redmine/app/views/custom_fields/index.api.rsb +0 -43
  258. data/spec/redmine/app/views/custom_fields/index.html.erb +0 -11
  259. data/spec/redmine/app/views/custom_fields/new.html.erb +0 -19
  260. data/spec/redmine/app/views/custom_fields/new.js.erb +0 -1
  261. data/spec/redmine/app/views/custom_fields/select_type.html.erb +0 -15
  262. data/spec/redmine/app/views/documents/_document.html.erb +0 -6
  263. data/spec/redmine/app/views/documents/_form.html.erb +0 -19
  264. data/spec/redmine/app/views/documents/edit.html.erb +0 -8
  265. data/spec/redmine/app/views/documents/index.html.erb +0 -40
  266. data/spec/redmine/app/views/documents/new.html.erb +0 -6
  267. data/spec/redmine/app/views/documents/show.html.erb +0 -41
  268. data/spec/redmine/app/views/email_addresses/_index.html.erb +0 -26
  269. data/spec/redmine/app/views/email_addresses/index.html.erb +0 -2
  270. data/spec/redmine/app/views/email_addresses/index.js.erb +0 -3
  271. data/spec/redmine/app/views/enumerations/_form.html.erb +0 -11
  272. data/spec/redmine/app/views/enumerations/destroy.html.erb +0 -12
  273. data/spec/redmine/app/views/enumerations/edit.html.erb +0 -6
  274. data/spec/redmine/app/views/enumerations/index.api.rsb +0 -9
  275. data/spec/redmine/app/views/enumerations/index.html.erb +0 -32
  276. data/spec/redmine/app/views/enumerations/new.html.erb +0 -7
  277. data/spec/redmine/app/views/files/index.html.erb +0 -46
  278. data/spec/redmine/app/views/files/new.html.erb +0 -16
  279. data/spec/redmine/app/views/gantts/show.html.erb +0 -334
  280. data/spec/redmine/app/views/groups/_form.html.erb +0 -10
  281. data/spec/redmine/app/views/groups/_general.html.erb +0 -4
  282. data/spec/redmine/app/views/groups/_memberships.html.erb +0 -1
  283. data/spec/redmine/app/views/groups/_new_users_form.html.erb +0 -9
  284. data/spec/redmine/app/views/groups/_new_users_modal.html.erb +0 -9
  285. data/spec/redmine/app/views/groups/_users.html.erb +0 -22
  286. data/spec/redmine/app/views/groups/add_users.js.erb +0 -5
  287. data/spec/redmine/app/views/groups/autocomplete_for_user.js.erb +0 -1
  288. data/spec/redmine/app/views/groups/destroy_membership.js.erb +0 -1
  289. data/spec/redmine/app/views/groups/edit.html.erb +0 -3
  290. data/spec/redmine/app/views/groups/edit_membership.js.erb +0 -6
  291. data/spec/redmine/app/views/groups/index.api.rsb +0 -11
  292. data/spec/redmine/app/views/groups/index.html.erb +0 -25
  293. data/spec/redmine/app/views/groups/new.html.erb +0 -9
  294. data/spec/redmine/app/views/groups/new_users.html.erb +0 -6
  295. data/spec/redmine/app/views/groups/new_users.js.erb +0 -2
  296. data/spec/redmine/app/views/groups/remove_user.js.erb +0 -1
  297. data/spec/redmine/app/views/groups/show.api.rsb +0 -31
  298. data/spec/redmine/app/views/groups/show.html.erb +0 -7
  299. data/spec/redmine/app/views/issue_categories/_form.html.erb +0 -6
  300. data/spec/redmine/app/views/issue_categories/_new_modal.html.erb +0 -9
  301. data/spec/redmine/app/views/issue_categories/create.js.erb +0 -3
  302. data/spec/redmine/app/views/issue_categories/destroy.html.erb +0 -16
  303. data/spec/redmine/app/views/issue_categories/edit.html.erb +0 -7
  304. data/spec/redmine/app/views/issue_categories/index.api.rsb +0 -10
  305. data/spec/redmine/app/views/issue_categories/new.html.erb +0 -7
  306. data/spec/redmine/app/views/issue_categories/new.js.erb +0 -2
  307. data/spec/redmine/app/views/issue_categories/show.api.rsb +0 -6
  308. data/spec/redmine/app/views/issue_relations/_form.html.erb +0 -14
  309. data/spec/redmine/app/views/issue_relations/create.js.erb +0 -7
  310. data/spec/redmine/app/views/issue_relations/destroy.js.erb +0 -1
  311. data/spec/redmine/app/views/issue_relations/index.api.rsb +0 -11
  312. data/spec/redmine/app/views/issue_relations/show.api.rsb +0 -7
  313. data/spec/redmine/app/views/issue_statuses/_form.html.erb +0 -11
  314. data/spec/redmine/app/views/issue_statuses/edit.html.erb +0 -6
  315. data/spec/redmine/app/views/issue_statuses/index.api.rsb +0 -9
  316. data/spec/redmine/app/views/issue_statuses/index.html.erb +0 -37
  317. data/spec/redmine/app/views/issue_statuses/new.html.erb +0 -6
  318. data/spec/redmine/app/views/issues/_action_menu.html.erb +0 -7
  319. data/spec/redmine/app/views/issues/_attributes.html.erb +0 -79
  320. data/spec/redmine/app/views/issues/_changesets.html.erb +0 -10
  321. data/spec/redmine/app/views/issues/_conflict.html.erb +0 -26
  322. data/spec/redmine/app/views/issues/_edit.html.erb +0 -52
  323. data/spec/redmine/app/views/issues/_form.html.erb +0 -55
  324. data/spec/redmine/app/views/issues/_form_custom_fields.html.erb +0 -14
  325. data/spec/redmine/app/views/issues/_history.html.erb +0 -23
  326. data/spec/redmine/app/views/issues/_list.html.erb +0 -45
  327. data/spec/redmine/app/views/issues/_list_simple.html.erb +0 -29
  328. data/spec/redmine/app/views/issues/_relations.html.erb +0 -41
  329. data/spec/redmine/app/views/issues/_sidebar.html.erb +0 -21
  330. data/spec/redmine/app/views/issues/bulk_edit.html.erb +0 -207
  331. data/spec/redmine/app/views/issues/bulk_edit.js.erb +0 -1
  332. data/spec/redmine/app/views/issues/destroy.html.erb +0 -15
  333. data/spec/redmine/app/views/issues/edit.html.erb +0 -6
  334. data/spec/redmine/app/views/issues/edit.js.erb +0 -7
  335. data/spec/redmine/app/views/issues/index.api.rsb +0 -36
  336. data/spec/redmine/app/views/issues/index.html.erb +0 -114
  337. data/spec/redmine/app/views/issues/index.pdf.erb +0 -1
  338. data/spec/redmine/app/views/issues/new.html.erb +0 -59
  339. data/spec/redmine/app/views/issues/new.js.erb +0 -1
  340. data/spec/redmine/app/views/issues/show.api.rsb +0 -75
  341. data/spec/redmine/app/views/issues/show.html.erb +0 -162
  342. data/spec/redmine/app/views/issues/show.pdf.erb +0 -1
  343. data/spec/redmine/app/views/journals/_notes_form.html.erb +0 -18
  344. data/spec/redmine/app/views/journals/diff.html.erb +0 -13
  345. data/spec/redmine/app/views/journals/edit.js.erb +0 -8
  346. data/spec/redmine/app/views/journals/index.builder +0 -31
  347. data/spec/redmine/app/views/journals/new.js.erb +0 -10
  348. data/spec/redmine/app/views/journals/update.js.erb +0 -9
  349. data/spec/redmine/app/views/layouts/admin.html.erb +0 -8
  350. data/spec/redmine/app/views/layouts/base.html.erb +0 -80
  351. data/spec/redmine/app/views/layouts/mailer.html.erb +0 -61
  352. data/spec/redmine/app/views/layouts/mailer.text.erb +0 -8
  353. data/spec/redmine/app/views/mail_handler/new.html.erb +0 -43
  354. data/spec/redmine/app/views/mailer/_issue.html.erb +0 -14
  355. data/spec/redmine/app/views/mailer/_issue.text.erb +0 -13
  356. data/spec/redmine/app/views/mailer/account_activated.html.erb +0 -2
  357. data/spec/redmine/app/views/mailer/account_activated.text.erb +0 -2
  358. data/spec/redmine/app/views/mailer/account_activation_request.html.erb +0 -2
  359. data/spec/redmine/app/views/mailer/account_activation_request.text.erb +0 -2
  360. data/spec/redmine/app/views/mailer/account_information.html.erb +0 -11
  361. data/spec/redmine/app/views/mailer/account_information.text.erb +0 -6
  362. data/spec/redmine/app/views/mailer/attachments_added.html.erb +0 -5
  363. data/spec/redmine/app/views/mailer/attachments_added.text.erb +0 -4
  364. data/spec/redmine/app/views/mailer/document_added.html.erb +0 -3
  365. data/spec/redmine/app/views/mailer/document_added.text.erb +0 -4
  366. data/spec/redmine/app/views/mailer/issue_add.html.erb +0 -3
  367. data/spec/redmine/app/views/mailer/issue_add.text.erb +0 -4
  368. data/spec/redmine/app/views/mailer/issue_edit.html.erb +0 -14
  369. data/spec/redmine/app/views/mailer/issue_edit.text.erb +0 -12
  370. data/spec/redmine/app/views/mailer/lost_password.html.erb +0 -4
  371. data/spec/redmine/app/views/mailer/lost_password.text.erb +0 -4
  372. data/spec/redmine/app/views/mailer/message_posted.html.erb +0 -4
  373. data/spec/redmine/app/views/mailer/message_posted.text.erb +0 -4
  374. data/spec/redmine/app/views/mailer/news_added.html.erb +0 -4
  375. data/spec/redmine/app/views/mailer/news_added.text.erb +0 -5
  376. data/spec/redmine/app/views/mailer/news_comment_added.html.erb +0 -5
  377. data/spec/redmine/app/views/mailer/news_comment_added.text.erb +0 -6
  378. data/spec/redmine/app/views/mailer/register.html.erb +0 -2
  379. data/spec/redmine/app/views/mailer/register.text.erb +0 -2
  380. data/spec/redmine/app/views/mailer/reminder.html.erb +0 -9
  381. data/spec/redmine/app/views/mailer/reminder.text.erb +0 -7
  382. data/spec/redmine/app/views/mailer/test_email.html.erb +0 -2
  383. data/spec/redmine/app/views/mailer/test_email.text.erb +0 -2
  384. data/spec/redmine/app/views/mailer/wiki_content_added.html.erb +0 -3
  385. data/spec/redmine/app/views/mailer/wiki_content_added.text.erb +0 -5
  386. data/spec/redmine/app/views/mailer/wiki_content_updated.html.erb +0 -6
  387. data/spec/redmine/app/views/mailer/wiki_content_updated.text.erb +0 -8
  388. data/spec/redmine/app/views/members/_new_form.html.erb +0 -16
  389. data/spec/redmine/app/views/members/_new_modal.html.erb +0 -9
  390. data/spec/redmine/app/views/members/autocomplete.js.erb +0 -1
  391. data/spec/redmine/app/views/members/create.js.erb +0 -12
  392. data/spec/redmine/app/views/members/destroy.js.erb +0 -2
  393. data/spec/redmine/app/views/members/index.api.rsb +0 -18
  394. data/spec/redmine/app/views/members/new.html.erb +0 -6
  395. data/spec/redmine/app/views/members/new.js.erb +0 -2
  396. data/spec/redmine/app/views/members/show.api.rsb +0 -14
  397. data/spec/redmine/app/views/members/update.js.erb +0 -3
  398. data/spec/redmine/app/views/messages/_form.html.erb +0 -32
  399. data/spec/redmine/app/views/messages/edit.html.erb +0 -17
  400. data/spec/redmine/app/views/messages/new.html.erb +0 -9
  401. data/spec/redmine/app/views/messages/quote.js.erb +0 -4
  402. data/spec/redmine/app/views/messages/show.html.erb +0 -85
  403. data/spec/redmine/app/views/my/_block.html.erb +0 -10
  404. data/spec/redmine/app/views/my/_sidebar.html.erb +0 -36
  405. data/spec/redmine/app/views/my/account.html.erb +0 -59
  406. data/spec/redmine/app/views/my/blocks/_calendar.html.erb +0 -6
  407. data/spec/redmine/app/views/my/blocks/_documents.html.erb +0 -3
  408. data/spec/redmine/app/views/my/blocks/_issuesassignedtome.html.erb +0 -15
  409. data/spec/redmine/app/views/my/blocks/_issuesreportedbyme.html.erb +0 -15
  410. data/spec/redmine/app/views/my/blocks/_issueswatched.html.erb +0 -8
  411. data/spec/redmine/app/views/my/blocks/_news.html.erb +0 -3
  412. data/spec/redmine/app/views/my/blocks/_timelog.html.erb +0 -58
  413. data/spec/redmine/app/views/my/destroy.html.erb +0 -11
  414. data/spec/redmine/app/views/my/page.html.erb +0 -36
  415. data/spec/redmine/app/views/my/page_layout.html.erb +0 -41
  416. data/spec/redmine/app/views/my/password.html.erb +0 -24
  417. data/spec/redmine/app/views/my/show_api_key.html.erb +0 -7
  418. data/spec/redmine/app/views/my/show_api_key.js.erb +0 -1
  419. data/spec/redmine/app/views/news/_form.html.erb +0 -10
  420. data/spec/redmine/app/views/news/_news.html.erb +0 -6
  421. data/spec/redmine/app/views/news/edit.html.erb +0 -12
  422. data/spec/redmine/app/views/news/index.api.rsb +0 -14
  423. data/spec/redmine/app/views/news/index.html.erb +0 -51
  424. data/spec/redmine/app/views/news/new.html.erb +0 -9
  425. data/spec/redmine/app/views/news/show.html.erb +0 -62
  426. data/spec/redmine/app/views/previews/issue.html.erb +0 -11
  427. data/spec/redmine/app/views/principal_memberships/_index.html.erb +0 -52
  428. data/spec/redmine/app/views/principal_memberships/_new_form.html.erb +0 -24
  429. data/spec/redmine/app/views/principal_memberships/_new_modal.html.erb +0 -9
  430. data/spec/redmine/app/views/principal_memberships/create.js.erb +0 -12
  431. data/spec/redmine/app/views/principal_memberships/destroy.js.erb +0 -1
  432. data/spec/redmine/app/views/principal_memberships/new.html.erb +0 -6
  433. data/spec/redmine/app/views/principal_memberships/new.js.erb +0 -13
  434. data/spec/redmine/app/views/principal_memberships/update.js.erb +0 -6
  435. data/spec/redmine/app/views/projects/_edit.html.erb +0 -4
  436. data/spec/redmine/app/views/projects/_form.html.erb +0 -102
  437. data/spec/redmine/app/views/projects/_members_box.html.erb +0 -8
  438. data/spec/redmine/app/views/projects/_sidebar.html.erb +0 -14
  439. data/spec/redmine/app/views/projects/copy.html.erb +0 -20
  440. data/spec/redmine/app/views/projects/destroy.html.erb +0 -19
  441. data/spec/redmine/app/views/projects/index.api.rsb +0 -19
  442. data/spec/redmine/app/views/projects/index.html.erb +0 -33
  443. data/spec/redmine/app/views/projects/new.html.erb +0 -7
  444. data/spec/redmine/app/views/projects/settings.html.erb +0 -5
  445. data/spec/redmine/app/views/projects/settings/_activities.html.erb +0 -42
  446. data/spec/redmine/app/views/projects/settings/_boards.html.erb +0 -36
  447. data/spec/redmine/app/views/projects/settings/_issue_categories.html.erb +0 -29
  448. data/spec/redmine/app/views/projects/settings/_members.html.erb +0 -62
  449. data/spec/redmine/app/views/projects/settings/_modules.html.erb +0 -18
  450. data/spec/redmine/app/views/projects/settings/_repositories.html.erb +0 -41
  451. data/spec/redmine/app/views/projects/settings/_versions.html.erb +0 -41
  452. data/spec/redmine/app/views/projects/settings/_wiki.html.erb +0 -19
  453. data/spec/redmine/app/views/projects/show.api.rsb +0 -16
  454. data/spec/redmine/app/views/projects/show.html.erb +0 -85
  455. data/spec/redmine/app/views/queries/_columns.html.erb +0 -40
  456. data/spec/redmine/app/views/queries/_filters.html.erb +0 -28
  457. data/spec/redmine/app/views/queries/_form.html.erb +0 -89
  458. data/spec/redmine/app/views/queries/edit.html.erb +0 -6
  459. data/spec/redmine/app/views/queries/index.api.rsb +0 -10
  460. data/spec/redmine/app/views/queries/index.html.erb +0 -25
  461. data/spec/redmine/app/views/queries/new.html.erb +0 -6
  462. data/spec/redmine/app/views/reports/_details.html.erb +0 -29
  463. data/spec/redmine/app/views/reports/_simple.html.erb +0 -23
  464. data/spec/redmine/app/views/reports/issue_report.html.erb +0 -33
  465. data/spec/redmine/app/views/reports/issue_report_details.html.erb +0 -7
  466. data/spec/redmine/app/views/repositories/_breadcrumbs.html.erb +0 -31
  467. data/spec/redmine/app/views/repositories/_dir_list.html.erb +0 -19
  468. data/spec/redmine/app/views/repositories/_dir_list_content.html.erb +0 -31
  469. data/spec/redmine/app/views/repositories/_form.html.erb +0 -31
  470. data/spec/redmine/app/views/repositories/_link_to_functions.html.erb +0 -19
  471. data/spec/redmine/app/views/repositories/_navigation.html.erb +0 -34
  472. data/spec/redmine/app/views/repositories/_related_issues.html.erb +0 -40
  473. data/spec/redmine/app/views/repositories/_revision_graph.html.erb +0 -18
  474. data/spec/redmine/app/views/repositories/_revisions.html.erb +0 -51
  475. data/spec/redmine/app/views/repositories/add_related_issue.js.erb +0 -7
  476. data/spec/redmine/app/views/repositories/annotate.html.erb +0 -46
  477. data/spec/redmine/app/views/repositories/changes.html.erb +0 -20
  478. data/spec/redmine/app/views/repositories/committers.html.erb +0 -42
  479. data/spec/redmine/app/views/repositories/diff.html.erb +0 -27
  480. data/spec/redmine/app/views/repositories/edit.html.erb +0 -5
  481. data/spec/redmine/app/views/repositories/entry.html.erb +0 -15
  482. data/spec/redmine/app/views/repositories/new.html.erb +0 -5
  483. data/spec/redmine/app/views/repositories/new.js.erb +0 -1
  484. data/spec/redmine/app/views/repositories/remove_related_issue.js.erb +0 -1
  485. data/spec/redmine/app/views/repositories/revision.html.erb +0 -103
  486. data/spec/redmine/app/views/repositories/revisions.html.erb +0 -34
  487. data/spec/redmine/app/views/repositories/show.html.erb +0 -77
  488. data/spec/redmine/app/views/repositories/stats.html.erb +0 -20
  489. data/spec/redmine/app/views/roles/_form.html.erb +0 -71
  490. data/spec/redmine/app/views/roles/edit.html.erb +0 -6
  491. data/spec/redmine/app/views/roles/index.api.rsb +0 -8
  492. data/spec/redmine/app/views/roles/index.html.erb +0 -34
  493. data/spec/redmine/app/views/roles/new.html.erb +0 -6
  494. data/spec/redmine/app/views/roles/permissions.html.erb +0 -55
  495. data/spec/redmine/app/views/roles/show.api.rsb +0 -9
  496. data/spec/redmine/app/views/search/index.html.erb +0 -77
  497. data/spec/redmine/app/views/settings/_authentication.html.erb +0 -44
  498. data/spec/redmine/app/views/settings/_display.html.erb +0 -30
  499. data/spec/redmine/app/views/settings/_general.html.erb +0 -42
  500. data/spec/redmine/app/views/settings/_issues.html.erb +0 -44
  501. data/spec/redmine/app/views/settings/_mail_handler.html.erb +0 -28
  502. data/spec/redmine/app/views/settings/_notifications.html.erb +0 -42
  503. data/spec/redmine/app/views/settings/_projects.html.erb +0 -20
  504. data/spec/redmine/app/views/settings/_repositories.html.erb +0 -158
  505. data/spec/redmine/app/views/settings/edit.html.erb +0 -5
  506. data/spec/redmine/app/views/settings/plugin.html.erb +0 -10
  507. data/spec/redmine/app/views/sudo_mode/_new_modal.html.erb +0 -18
  508. data/spec/redmine/app/views/sudo_mode/new.html.erb +0 -15
  509. data/spec/redmine/app/views/sudo_mode/new.js.erb +0 -4
  510. data/spec/redmine/app/views/timelog/_date_range.html.erb +0 -36
  511. data/spec/redmine/app/views/timelog/_form.html.erb +0 -47
  512. data/spec/redmine/app/views/timelog/_list.html.erb +0 -41
  513. data/spec/redmine/app/views/timelog/_report_criteria.html.erb +0 -19
  514. data/spec/redmine/app/views/timelog/bulk_edit.html.erb +0 -50
  515. data/spec/redmine/app/views/timelog/edit.html.erb +0 -6
  516. data/spec/redmine/app/views/timelog/index.api.rsb +0 -18
  517. data/spec/redmine/app/views/timelog/index.html.erb +0 -48
  518. data/spec/redmine/app/views/timelog/new.html.erb +0 -7
  519. data/spec/redmine/app/views/timelog/new.js.erb +0 -1
  520. data/spec/redmine/app/views/timelog/report.html.erb +0 -74
  521. data/spec/redmine/app/views/timelog/show.api.rsb +0 -14
  522. data/spec/redmine/app/views/trackers/_form.html.erb +0 -56
  523. data/spec/redmine/app/views/trackers/edit.html.erb +0 -5
  524. data/spec/redmine/app/views/trackers/fields.html.erb +0 -75
  525. data/spec/redmine/app/views/trackers/index.api.rsb +0 -9
  526. data/spec/redmine/app/views/trackers/index.html.erb +0 -39
  527. data/spec/redmine/app/views/trackers/new.html.erb +0 -5
  528. data/spec/redmine/app/views/users/_form.html.erb +0 -69
  529. data/spec/redmine/app/views/users/_general.html.erb +0 -7
  530. data/spec/redmine/app/views/users/_groups.html.erb +0 -9
  531. data/spec/redmine/app/views/users/_mail_notifications.html.erb +0 -30
  532. data/spec/redmine/app/views/users/_memberships.html.erb +0 -1
  533. data/spec/redmine/app/views/users/_preferences.html.erb +0 -6
  534. data/spec/redmine/app/views/users/destroy_membership.js.erb +0 -1
  535. data/spec/redmine/app/views/users/edit.html.erb +0 -10
  536. data/spec/redmine/app/views/users/edit_membership.js.erb +0 -6
  537. data/spec/redmine/app/views/users/index.api.rsb +0 -15
  538. data/spec/redmine/app/views/users/index.html.erb +0 -58
  539. data/spec/redmine/app/views/users/new.html.erb +0 -30
  540. data/spec/redmine/app/views/users/show.api.rsb +0 -37
  541. data/spec/redmine/app/views/users/show.html.erb +0 -75
  542. data/spec/redmine/app/views/versions/_form.html.erb +0 -16
  543. data/spec/redmine/app/views/versions/_issue_counts.html.erb +0 -33
  544. data/spec/redmine/app/views/versions/_new_modal.html.erb +0 -9
  545. data/spec/redmine/app/views/versions/_overview.html.erb +0 -33
  546. data/spec/redmine/app/views/versions/create.js.erb +0 -3
  547. data/spec/redmine/app/views/versions/edit.html.erb +0 -7
  548. data/spec/redmine/app/views/versions/index.api.rsb +0 -19
  549. data/spec/redmine/app/views/versions/index.html.erb +0 -97
  550. data/spec/redmine/app/views/versions/new.html.erb +0 -6
  551. data/spec/redmine/app/views/versions/new.js.erb +0 -2
  552. data/spec/redmine/app/views/versions/show.api.rsb +0 -15
  553. data/spec/redmine/app/views/versions/show.html.erb +0 -55
  554. data/spec/redmine/app/views/versions/status_by.js.erb +0 -1
  555. data/spec/redmine/app/views/watchers/_new.html.erb +0 -27
  556. data/spec/redmine/app/views/watchers/_set_watcher.js.erb +0 -3
  557. data/spec/redmine/app/views/watchers/_watchers.html.erb +0 -12
  558. data/spec/redmine/app/views/watchers/append.js.erb +0 -4
  559. data/spec/redmine/app/views/watchers/autocomplete_for_user.html.erb +0 -1
  560. data/spec/redmine/app/views/watchers/create.js.erb +0 -2
  561. data/spec/redmine/app/views/watchers/destroy.js.erb +0 -1
  562. data/spec/redmine/app/views/watchers/new.js.erb +0 -3
  563. data/spec/redmine/app/views/welcome/index.html.erb +0 -41
  564. data/spec/redmine/app/views/welcome/robots.html.erb +0 -10
  565. data/spec/redmine/app/views/wiki/_content.html.erb +0 -4
  566. data/spec/redmine/app/views/wiki/_sidebar.html.erb +0 -12
  567. data/spec/redmine/app/views/wiki/annotate.html.erb +0 -40
  568. data/spec/redmine/app/views/wiki/date_index.html.erb +0 -36
  569. data/spec/redmine/app/views/wiki/destroy.html.erb +0 -22
  570. data/spec/redmine/app/views/wiki/diff.html.erb +0 -29
  571. data/spec/redmine/app/views/wiki/edit.html.erb +0 -47
  572. data/spec/redmine/app/views/wiki/export.html.erb +0 -21
  573. data/spec/redmine/app/views/wiki/export.pdf.erb +0 -1
  574. data/spec/redmine/app/views/wiki/export_multiple.html.erb +0 -34
  575. data/spec/redmine/app/views/wiki/history.html.erb +0 -40
  576. data/spec/redmine/app/views/wiki/index.api.rsb +0 -13
  577. data/spec/redmine/app/views/wiki/index.html.erb +0 -35
  578. data/spec/redmine/app/views/wiki/rename.html.erb +0 -26
  579. data/spec/redmine/app/views/wiki/show.api.rsb +0 -18
  580. data/spec/redmine/app/views/wiki/show.html.erb +0 -75
  581. data/spec/redmine/app/views/wiki/show.pdf.erb +0 -1
  582. data/spec/redmine/app/views/wikis/destroy.html.erb +0 -10
  583. data/spec/redmine/app/views/wikis/edit.js.erb +0 -1
  584. data/spec/redmine/app/views/workflows/_action_menu.html.erb +0 -4
  585. data/spec/redmine/app/views/workflows/_form.html.erb +0 -40
  586. data/spec/redmine/app/views/workflows/copy.html.erb +0 -38
  587. data/spec/redmine/app/views/workflows/edit.html.erb +0 -75
  588. data/spec/redmine/app/views/workflows/index.html.erb +0 -33
  589. data/spec/redmine/app/views/workflows/permissions.html.erb +0 -123
  590. data/spec/redmine/bin/about +0 -6
  591. data/spec/redmine/bin/bundle +0 -3
  592. data/spec/redmine/bin/rails +0 -4
  593. data/spec/redmine/bin/rake +0 -5
  594. data/spec/redmine/config.ru +0 -4
  595. data/spec/redmine/config/additional_environment.rb.example +0 -10
  596. data/spec/redmine/config/application.rb +0 -73
  597. data/spec/redmine/config/boot.rb +0 -5
  598. data/spec/redmine/config/configuration.yml.example +0 -221
  599. data/spec/redmine/config/database.yml +0 -25
  600. data/spec/redmine/config/database.yml.example +0 -51
  601. data/spec/redmine/config/environment.rb +0 -14
  602. data/spec/redmine/config/environments/development.rb +0 -21
  603. data/spec/redmine/config/environments/production.rb +0 -25
  604. data/spec/redmine/config/environments/test.rb +0 -35
  605. data/spec/redmine/config/environments/test_pgsql.rb +0 -2
  606. data/spec/redmine/config/environments/test_sqlite3.rb +0 -2
  607. data/spec/redmine/config/initializers/00-core_plugins.rb +0 -15
  608. data/spec/redmine/config/initializers/10-patches.rb +0 -180
  609. data/spec/redmine/config/initializers/20-mime_types.rb +0 -4
  610. data/spec/redmine/config/initializers/30-redmine.rb +0 -30
  611. data/spec/redmine/config/initializers/backtrace_silencers.rb +0 -7
  612. data/spec/redmine/config/initializers/inflections.rb +0 -10
  613. data/spec/redmine/config/locales/ar.yml +0 -1157
  614. data/spec/redmine/config/locales/az.yml +0 -1254
  615. data/spec/redmine/config/locales/bg.yml +0 -1150
  616. data/spec/redmine/config/locales/bs.yml +0 -1170
  617. data/spec/redmine/config/locales/ca.yml +0 -1159
  618. data/spec/redmine/config/locales/cs.yml +0 -1159
  619. data/spec/redmine/config/locales/da.yml +0 -1174
  620. data/spec/redmine/config/locales/de.yml +0 -1166
  621. data/spec/redmine/config/locales/el.yml +0 -1157
  622. data/spec/redmine/config/locales/en-GB.yml +0 -1159
  623. data/spec/redmine/config/locales/en.yml +0 -1146
  624. data/spec/redmine/config/locales/es-PA.yml +0 -1191
  625. data/spec/redmine/config/locales/es.yml +0 -1189
  626. data/spec/redmine/config/locales/et.yml +0 -1170
  627. data/spec/redmine/config/locales/eu.yml +0 -1158
  628. data/spec/redmine/config/locales/fa.yml +0 -1158
  629. data/spec/redmine/config/locales/fi.yml +0 -1178
  630. data/spec/redmine/config/locales/fr.yml +0 -1166
  631. data/spec/redmine/config/locales/gl.yml +0 -1165
  632. data/spec/redmine/config/locales/he.yml +0 -1162
  633. data/spec/redmine/config/locales/hr.yml +0 -1158
  634. data/spec/redmine/config/locales/hu.yml +0 -1176
  635. data/spec/redmine/config/locales/id.yml +0 -1161
  636. data/spec/redmine/config/locales/it.yml +0 -1152
  637. data/spec/redmine/config/locales/ja.yml +0 -1172
  638. data/spec/redmine/config/locales/ko.yml +0 -1201
  639. data/spec/redmine/config/locales/lt.yml +0 -1216
  640. data/spec/redmine/config/locales/lv.yml +0 -1151
  641. data/spec/redmine/config/locales/mk.yml +0 -1157
  642. data/spec/redmine/config/locales/mn.yml +0 -1158
  643. data/spec/redmine/config/locales/nl.yml +0 -1136
  644. data/spec/redmine/config/locales/no.yml +0 -1147
  645. data/spec/redmine/config/locales/pl.yml +0 -1177
  646. data/spec/redmine/config/locales/pt-BR.yml +0 -1176
  647. data/spec/redmine/config/locales/pt.yml +0 -1162
  648. data/spec/redmine/config/locales/ro.yml +0 -1152
  649. data/spec/redmine/config/locales/ru.yml +0 -1262
  650. data/spec/redmine/config/locales/sk.yml +0 -1147
  651. data/spec/redmine/config/locales/sl.yml +0 -1157
  652. data/spec/redmine/config/locales/sq.yml +0 -1153
  653. data/spec/redmine/config/locales/sr-YU.yml +0 -1159
  654. data/spec/redmine/config/locales/sr.yml +0 -1158
  655. data/spec/redmine/config/locales/sv.yml +0 -1190
  656. data/spec/redmine/config/locales/th.yml +0 -1154
  657. data/spec/redmine/config/locales/tr.yml +0 -1166
  658. data/spec/redmine/config/locales/uk.yml +0 -1152
  659. data/spec/redmine/config/locales/vi.yml +0 -1210
  660. data/spec/redmine/config/locales/zh-TW.yml +0 -1233
  661. data/spec/redmine/config/locales/zh.yml +0 -1158
  662. data/spec/redmine/config/routes.rb +0 -366
  663. data/spec/redmine/config/settings.yml +0 -252
  664. data/spec/redmine/db/migrate/001_setup.rb +0 -329
  665. data/spec/redmine/db/migrate/002_issue_move.rb +0 -12
  666. data/spec/redmine/db/migrate/003_issue_add_note.rb +0 -12
  667. data/spec/redmine/db/migrate/004_export_pdf.rb +0 -14
  668. data/spec/redmine/db/migrate/005_issue_start_date.rb +0 -11
  669. data/spec/redmine/db/migrate/006_calendar_and_activity.rb +0 -16
  670. data/spec/redmine/db/migrate/007_create_journals.rb +0 -56
  671. data/spec/redmine/db/migrate/008_create_user_preferences.rb +0 -12
  672. data/spec/redmine/db/migrate/009_add_hide_mail_pref.rb +0 -9
  673. data/spec/redmine/db/migrate/010_create_comments.rb +0 -16
  674. data/spec/redmine/db/migrate/011_add_news_comments_count.rb +0 -9
  675. data/spec/redmine/db/migrate/012_add_comments_permissions.rb +0 -14
  676. data/spec/redmine/db/migrate/013_create_queries.rb +0 -15
  677. data/spec/redmine/db/migrate/014_add_queries_permissions.rb +0 -12
  678. data/spec/redmine/db/migrate/015_create_repositories.rb +0 -12
  679. data/spec/redmine/db/migrate/016_add_repositories_permissions.rb +0 -22
  680. data/spec/redmine/db/migrate/017_create_settings.rb +0 -12
  681. data/spec/redmine/db/migrate/018_set_doc_and_files_notifications.rb +0 -18
  682. data/spec/redmine/db/migrate/019_add_issue_status_position.rb +0 -10
  683. data/spec/redmine/db/migrate/020_add_role_position.rb +0 -10
  684. data/spec/redmine/db/migrate/021_add_tracker_position.rb +0 -10
  685. data/spec/redmine/db/migrate/022_serialize_possibles_values.rb +0 -13
  686. data/spec/redmine/db/migrate/023_add_tracker_is_in_roadmap.rb +0 -9
  687. data/spec/redmine/db/migrate/024_add_roadmap_permission.rb +0 -12
  688. data/spec/redmine/db/migrate/025_add_search_permission.rb +0 -12
  689. data/spec/redmine/db/migrate/026_add_repository_login_and_password.rb +0 -11
  690. data/spec/redmine/db/migrate/027_create_wikis.rb +0 -14
  691. data/spec/redmine/db/migrate/028_create_wiki_pages.rb +0 -14
  692. data/spec/redmine/db/migrate/029_create_wiki_contents.rb +0 -30
  693. data/spec/redmine/db/migrate/030_add_projects_feeds_permissions.rb +0 -12
  694. data/spec/redmine/db/migrate/031_add_repository_root_url.rb +0 -9
  695. data/spec/redmine/db/migrate/032_create_time_entries.rb +0 -24
  696. data/spec/redmine/db/migrate/033_add_timelog_permissions.rb +0 -12
  697. data/spec/redmine/db/migrate/034_create_changesets.rb +0 -16
  698. data/spec/redmine/db/migrate/035_create_changes.rb +0 -16
  699. data/spec/redmine/db/migrate/036_add_changeset_commit_date.rb +0 -10
  700. data/spec/redmine/db/migrate/037_add_project_identifier.rb +0 -9
  701. data/spec/redmine/db/migrate/038_add_custom_field_is_filter.rb +0 -9
  702. data/spec/redmine/db/migrate/039_create_watchers.rb +0 -13
  703. data/spec/redmine/db/migrate/040_create_changesets_issues.rb +0 -13
  704. data/spec/redmine/db/migrate/041_rename_comment_to_comments.rb +0 -13
  705. data/spec/redmine/db/migrate/042_create_issue_relations.rb +0 -14
  706. data/spec/redmine/db/migrate/043_add_relations_permissions.rb +0 -14
  707. data/spec/redmine/db/migrate/044_set_language_length_to_five.rb +0 -9
  708. data/spec/redmine/db/migrate/045_create_boards.rb +0 -18
  709. data/spec/redmine/db/migrate/046_create_messages.rb +0 -21
  710. data/spec/redmine/db/migrate/047_add_boards_permissions.rb +0 -16
  711. data/spec/redmine/db/migrate/048_allow_null_version_effective_date.rb +0 -9
  712. data/spec/redmine/db/migrate/049_add_wiki_destroy_page_permission.rb +0 -12
  713. data/spec/redmine/db/migrate/050_add_wiki_attachments_permissions.rb +0 -14
  714. data/spec/redmine/db/migrate/051_add_project_status.rb +0 -9
  715. data/spec/redmine/db/migrate/052_add_changes_revision.rb +0 -9
  716. data/spec/redmine/db/migrate/053_add_changes_branch.rb +0 -9
  717. data/spec/redmine/db/migrate/054_add_changesets_scmid.rb +0 -9
  718. data/spec/redmine/db/migrate/055_add_repositories_type.rb +0 -11
  719. data/spec/redmine/db/migrate/056_add_repositories_changes_permission.rb +0 -12
  720. data/spec/redmine/db/migrate/057_add_versions_wiki_page_title.rb +0 -9
  721. data/spec/redmine/db/migrate/058_add_issue_categories_assigned_to_id.rb +0 -9
  722. data/spec/redmine/db/migrate/059_add_roles_assignable.rb +0 -9
  723. data/spec/redmine/db/migrate/060_change_changesets_committer_limit.rb +0 -9
  724. data/spec/redmine/db/migrate/061_add_roles_builtin.rb +0 -9
  725. data/spec/redmine/db/migrate/062_insert_builtin_roles.rb +0 -16
  726. data/spec/redmine/db/migrate/063_add_roles_permissions.rb +0 -9
  727. data/spec/redmine/db/migrate/064_drop_permissions.rb +0 -10
  728. data/spec/redmine/db/migrate/065_add_settings_updated_on.rb +0 -11
  729. data/spec/redmine/db/migrate/066_add_custom_value_customized_index.rb +0 -9
  730. data/spec/redmine/db/migrate/067_create_wiki_redirects.rb +0 -15
  731. data/spec/redmine/db/migrate/068_create_enabled_modules.rb +0 -18
  732. data/spec/redmine/db/migrate/069_add_issues_estimated_hours.rb +0 -9
  733. data/spec/redmine/db/migrate/070_change_attachments_content_type_limit.rb +0 -9
  734. data/spec/redmine/db/migrate/071_add_queries_column_names.rb +0 -9
  735. data/spec/redmine/db/migrate/072_add_enumerations_position.rb +0 -15
  736. data/spec/redmine/db/migrate/073_add_enumerations_is_default.rb +0 -9
  737. data/spec/redmine/db/migrate/074_add_auth_sources_tls.rb +0 -9
  738. data/spec/redmine/db/migrate/075_add_members_mail_notification.rb +0 -9
  739. data/spec/redmine/db/migrate/076_allow_null_position.rb +0 -16
  740. data/spec/redmine/db/migrate/077_remove_issue_statuses_html_color.rb +0 -9
  741. data/spec/redmine/db/migrate/078_add_custom_fields_position.rb +0 -15
  742. data/spec/redmine/db/migrate/079_add_user_preferences_time_zone.rb +0 -9
  743. data/spec/redmine/db/migrate/080_add_users_type.rb +0 -10
  744. data/spec/redmine/db/migrate/081_create_projects_trackers.rb +0 -19
  745. data/spec/redmine/db/migrate/082_add_messages_locked.rb +0 -9
  746. data/spec/redmine/db/migrate/083_add_messages_sticky.rb +0 -9
  747. data/spec/redmine/db/migrate/084_change_auth_sources_account_limit.rb +0 -9
  748. data/spec/redmine/db/migrate/085_add_role_tracker_old_status_index_to_workflows.rb +0 -9
  749. data/spec/redmine/db/migrate/086_add_custom_fields_searchable.rb +0 -9
  750. data/spec/redmine/db/migrate/087_change_projects_description_to_text.rb +0 -8
  751. data/spec/redmine/db/migrate/088_add_custom_fields_default_value.rb +0 -9
  752. data/spec/redmine/db/migrate/089_add_attachments_description.rb +0 -9
  753. data/spec/redmine/db/migrate/090_change_versions_name_limit.rb +0 -9
  754. data/spec/redmine/db/migrate/091_change_changesets_revision_to_string.rb +0 -32
  755. data/spec/redmine/db/migrate/092_change_changes_from_revision_to_string.rb +0 -9
  756. data/spec/redmine/db/migrate/093_add_wiki_pages_protected.rb +0 -9
  757. data/spec/redmine/db/migrate/094_change_projects_homepage_limit.rb +0 -9
  758. data/spec/redmine/db/migrate/095_add_wiki_pages_parent_id.rb +0 -9
  759. data/spec/redmine/db/migrate/096_add_commit_access_permission.rb +0 -13
  760. data/spec/redmine/db/migrate/097_add_view_wiki_edits_permission.rb +0 -13
  761. data/spec/redmine/db/migrate/098_set_topic_authors_as_watchers.rb +0 -15
  762. data/spec/redmine/db/migrate/099_add_delete_wiki_pages_attachments_permission.rb +0 -13
  763. data/spec/redmine/db/migrate/100_add_changesets_user_id.rb +0 -9
  764. data/spec/redmine/db/migrate/101_populate_changesets_user_id.rb +0 -18
  765. data/spec/redmine/db/migrate/102_add_custom_fields_editable.rb +0 -9
  766. data/spec/redmine/db/migrate/103_set_custom_fields_editable.rb +0 -9
  767. data/spec/redmine/db/migrate/104_add_projects_lft_and_rgt.rb +0 -11
  768. data/spec/redmine/db/migrate/105_build_projects_tree.rb +0 -8
  769. data/spec/redmine/db/migrate/106_remove_projects_projects_count.rb +0 -9
  770. data/spec/redmine/db/migrate/107_add_open_id_authentication_tables.rb +0 -20
  771. data/spec/redmine/db/migrate/108_add_identity_url_to_users.rb +0 -9
  772. data/spec/redmine/db/migrate/20090214190337_add_watchers_user_id_type_index.rb +0 -9
  773. data/spec/redmine/db/migrate/20090312172426_add_queries_sort_criteria.rb +0 -9
  774. data/spec/redmine/db/migrate/20090312194159_add_projects_trackers_unique_index.rb +0 -21
  775. data/spec/redmine/db/migrate/20090318181151_extend_settings_name.rb +0 -9
  776. data/spec/redmine/db/migrate/20090323224724_add_type_to_enumerations.rb +0 -9
  777. data/spec/redmine/db/migrate/20090401221305_update_enumerations_to_sti.rb +0 -11
  778. data/spec/redmine/db/migrate/20090401231134_add_active_field_to_enumerations.rb +0 -9
  779. data/spec/redmine/db/migrate/20090403001910_add_project_to_enumerations.rb +0 -11
  780. data/spec/redmine/db/migrate/20090406161854_add_parent_id_to_enumerations.rb +0 -9
  781. data/spec/redmine/db/migrate/20090425161243_add_queries_group_by.rb +0 -9
  782. data/spec/redmine/db/migrate/20090503121501_create_member_roles.rb +0 -12
  783. data/spec/redmine/db/migrate/20090503121505_populate_member_roles.rb +0 -12
  784. data/spec/redmine/db/migrate/20090503121510_drop_members_role_id.rb +0 -9
  785. data/spec/redmine/db/migrate/20090614091200_fix_messages_sticky_null.rb +0 -9
  786. data/spec/redmine/db/migrate/20090704172350_populate_users_type.rb +0 -8
  787. data/spec/redmine/db/migrate/20090704172355_create_groups_users.rb +0 -13
  788. data/spec/redmine/db/migrate/20090704172358_add_member_roles_inherited_from.rb +0 -9
  789. data/spec/redmine/db/migrate/20091010093521_fix_users_custom_values.rb +0 -11
  790. data/spec/redmine/db/migrate/20091017212227_add_missing_indexes_to_workflows.rb +0 -13
  791. data/spec/redmine/db/migrate/20091017212457_add_missing_indexes_to_custom_fields_projects.rb +0 -9
  792. data/spec/redmine/db/migrate/20091017212644_add_missing_indexes_to_messages.rb +0 -11
  793. data/spec/redmine/db/migrate/20091017212938_add_missing_indexes_to_repositories.rb +0 -9
  794. data/spec/redmine/db/migrate/20091017213027_add_missing_indexes_to_comments.rb +0 -11
  795. data/spec/redmine/db/migrate/20091017213113_add_missing_indexes_to_enumerations.rb +0 -9
  796. data/spec/redmine/db/migrate/20091017213151_add_missing_indexes_to_wiki_pages.rb +0 -11
  797. data/spec/redmine/db/migrate/20091017213228_add_missing_indexes_to_watchers.rb +0 -11
  798. data/spec/redmine/db/migrate/20091017213257_add_missing_indexes_to_auth_sources.rb +0 -9
  799. data/spec/redmine/db/migrate/20091017213332_add_missing_indexes_to_documents.rb +0 -9
  800. data/spec/redmine/db/migrate/20091017213444_add_missing_indexes_to_tokens.rb +0 -9
  801. data/spec/redmine/db/migrate/20091017213536_add_missing_indexes_to_changesets.rb +0 -11
  802. data/spec/redmine/db/migrate/20091017213642_add_missing_indexes_to_issue_categories.rb +0 -9
  803. data/spec/redmine/db/migrate/20091017213716_add_missing_indexes_to_member_roles.rb +0 -11
  804. data/spec/redmine/db/migrate/20091017213757_add_missing_indexes_to_boards.rb +0 -9
  805. data/spec/redmine/db/migrate/20091017213835_add_missing_indexes_to_user_preferences.rb +0 -9
  806. data/spec/redmine/db/migrate/20091017213910_add_missing_indexes_to_issues.rb +0 -21
  807. data/spec/redmine/db/migrate/20091017214015_add_missing_indexes_to_members.rb +0 -11
  808. data/spec/redmine/db/migrate/20091017214107_add_missing_indexes_to_custom_fields.rb +0 -9
  809. data/spec/redmine/db/migrate/20091017214136_add_missing_indexes_to_queries.rb +0 -11
  810. data/spec/redmine/db/migrate/20091017214236_add_missing_indexes_to_time_entries.rb +0 -11
  811. data/spec/redmine/db/migrate/20091017214308_add_missing_indexes_to_news.rb +0 -9
  812. data/spec/redmine/db/migrate/20091017214336_add_missing_indexes_to_users.rb +0 -11
  813. data/spec/redmine/db/migrate/20091017214406_add_missing_indexes_to_attachments.rb +0 -11
  814. data/spec/redmine/db/migrate/20091017214440_add_missing_indexes_to_wiki_contents.rb +0 -9
  815. data/spec/redmine/db/migrate/20091017214519_add_missing_indexes_to_custom_values.rb +0 -9
  816. data/spec/redmine/db/migrate/20091017214611_add_missing_indexes_to_journals.rb +0 -11
  817. data/spec/redmine/db/migrate/20091017214644_add_missing_indexes_to_issue_relations.rb +0 -11
  818. data/spec/redmine/db/migrate/20091017214720_add_missing_indexes_to_wiki_redirects.rb +0 -9
  819. data/spec/redmine/db/migrate/20091017214750_add_missing_indexes_to_custom_fields_trackers.rb +0 -9
  820. data/spec/redmine/db/migrate/20091025163651_add_activity_indexes.rb +0 -25
  821. data/spec/redmine/db/migrate/20091108092559_add_versions_status.rb +0 -10
  822. data/spec/redmine/db/migrate/20091114105931_add_view_issues_permission.rb +0 -15
  823. data/spec/redmine/db/migrate/20091123212029_add_default_done_ratio_to_issue_status.rb +0 -9
  824. data/spec/redmine/db/migrate/20091205124427_add_versions_sharing.rb +0 -10
  825. data/spec/redmine/db/migrate/20091220183509_add_lft_and_rgt_indexes_to_projects.rb +0 -11
  826. data/spec/redmine/db/migrate/20091220183727_add_index_to_settings_name.rb +0 -9
  827. data/spec/redmine/db/migrate/20091220184736_add_indexes_to_issue_status.rb +0 -13
  828. data/spec/redmine/db/migrate/20091225164732_remove_enumerations_opt.rb +0 -12
  829. data/spec/redmine/db/migrate/20091227112908_change_wiki_contents_text_limit.rb +0 -16
  830. data/spec/redmine/db/migrate/20100129193402_change_users_mail_notification_to_string.rb +0 -21
  831. data/spec/redmine/db/migrate/20100129193813_update_mail_notification_values.rb +0 -11
  832. data/spec/redmine/db/migrate/20100221100219_add_index_on_changesets_scmid.rb +0 -9
  833. data/spec/redmine/db/migrate/20100313132032_add_issues_nested_sets_columns.rb +0 -17
  834. data/spec/redmine/db/migrate/20100313171051_add_index_on_issues_nested_set.rb +0 -9
  835. data/spec/redmine/db/migrate/20100705164950_change_changes_path_length_limit.rb +0 -14
  836. data/spec/redmine/db/migrate/20100819172912_enable_calendar_and_gantt_modules_where_appropriate.rb +0 -12
  837. data/spec/redmine/db/migrate/20101104182107_add_unique_index_on_members.rb +0 -22
  838. data/spec/redmine/db/migrate/20101107130441_add_custom_fields_visible.rb +0 -10
  839. data/spec/redmine/db/migrate/20101114115114_change_projects_name_limit.rb +0 -9
  840. data/spec/redmine/db/migrate/20101114115359_change_projects_identifier_limit.rb +0 -9
  841. data/spec/redmine/db/migrate/20110220160626_add_workflows_assignee_and_author.rb +0 -14
  842. data/spec/redmine/db/migrate/20110223180944_add_users_salt.rb +0 -9
  843. data/spec/redmine/db/migrate/20110223180953_salt_user_passwords.rb +0 -13
  844. data/spec/redmine/db/migrate/20110224000000_add_repositories_path_encoding.rb +0 -9
  845. data/spec/redmine/db/migrate/20110226120112_change_repositories_password_limit.rb +0 -9
  846. data/spec/redmine/db/migrate/20110226120132_change_auth_sources_account_password_limit.rb +0 -9
  847. data/spec/redmine/db/migrate/20110227125750_change_journal_details_values_to_text.rb +0 -11
  848. data/spec/redmine/db/migrate/20110228000000_add_repositories_log_encoding.rb +0 -9
  849. data/spec/redmine/db/migrate/20110228000100_copy_repositories_log_encoding.rb +0 -12
  850. data/spec/redmine/db/migrate/20110401192910_add_index_to_users_type.rb +0 -9
  851. data/spec/redmine/db/migrate/20110408103312_add_roles_issues_visibility.rb +0 -9
  852. data/spec/redmine/db/migrate/20110412065600_add_issues_is_private.rb +0 -9
  853. data/spec/redmine/db/migrate/20110511000000_add_repositories_extra_info.rb +0 -9
  854. data/spec/redmine/db/migrate/20110902000000_create_changeset_parents.rb +0 -14
  855. data/spec/redmine/db/migrate/20111201201315_add_unique_index_to_issue_relations.rb +0 -16
  856. data/spec/redmine/db/migrate/20120115143024_add_repositories_identifier.rb +0 -9
  857. data/spec/redmine/db/migrate/20120115143100_add_repositories_is_default.rb +0 -9
  858. data/spec/redmine/db/migrate/20120115143126_set_default_repositories.rb +0 -14
  859. data/spec/redmine/db/migrate/20120127174243_add_custom_fields_multiple.rb +0 -9
  860. data/spec/redmine/db/migrate/20120205111326_change_users_login_limit.rb +0 -9
  861. data/spec/redmine/db/migrate/20120223110929_change_attachments_container_defaults.rb +0 -25
  862. data/spec/redmine/db/migrate/20120301153455_add_auth_sources_filter.rb +0 -9
  863. data/spec/redmine/db/migrate/20120422150750_change_repositories_to_full_sti.rb +0 -22
  864. data/spec/redmine/db/migrate/20120705074331_add_trackers_fields_bits.rb +0 -9
  865. data/spec/redmine/db/migrate/20120707064544_add_auth_sources_timeout.rb +0 -9
  866. data/spec/redmine/db/migrate/20120714122000_add_workflows_type.rb +0 -9
  867. data/spec/redmine/db/migrate/20120714122100_update_workflows_to_sti.rb +0 -9
  868. data/spec/redmine/db/migrate/20120714122200_add_workflows_rule_fields.rb +0 -11
  869. data/spec/redmine/db/migrate/20120731164049_add_boards_parent_id.rb +0 -9
  870. data/spec/redmine/db/migrate/20120930112914_add_journals_private_notes.rb +0 -9
  871. data/spec/redmine/db/migrate/20121026002032_add_enumerations_position_name.rb +0 -9
  872. data/spec/redmine/db/migrate/20121026003537_populate_enumerations_position_name.rb +0 -9
  873. data/spec/redmine/db/migrate/20121209123234_add_queries_type.rb +0 -9
  874. data/spec/redmine/db/migrate/20121209123358_update_queries_to_sti.rb +0 -9
  875. data/spec/redmine/db/migrate/20121213084931_add_attachments_disk_directory.rb +0 -9
  876. data/spec/redmine/db/migrate/20130110122628_split_documents_permissions.rb +0 -23
  877. data/spec/redmine/db/migrate/20130201184705_add_unique_index_on_tokens_value.rb +0 -15
  878. data/spec/redmine/db/migrate/20130202090625_add_projects_inherit_members.rb +0 -9
  879. data/spec/redmine/db/migrate/20130207175206_add_unique_index_on_custom_fields_trackers.rb +0 -24
  880. data/spec/redmine/db/migrate/20130207181455_add_unique_index_on_custom_fields_projects.rb +0 -24
  881. data/spec/redmine/db/migrate/20130215073721_change_users_lastname_length_to_255.rb +0 -9
  882. data/spec/redmine/db/migrate/20130215111127_add_issues_closed_on.rb +0 -9
  883. data/spec/redmine/db/migrate/20130215111141_populate_issues_closed_on.rb +0 -26
  884. data/spec/redmine/db/migrate/20130217094251_remove_issues_default_fk_values.rb +0 -19
  885. data/spec/redmine/db/migrate/20130602092539_create_queries_roles.rb +0 -13
  886. data/spec/redmine/db/migrate/20130710182539_add_queries_visibility.rb +0 -13
  887. data/spec/redmine/db/migrate/20130713104233_create_custom_fields_roles.rb +0 -14
  888. data/spec/redmine/db/migrate/20130713111657_add_queries_options.rb +0 -9
  889. data/spec/redmine/db/migrate/20130729070143_add_users_must_change_passwd.rb +0 -9
  890. data/spec/redmine/db/migrate/20130911193200_remove_eols_from_attachments_filename.rb +0 -12
  891. data/spec/redmine/db/migrate/20131004113137_support_for_multiple_commit_keywords.rb +0 -17
  892. data/spec/redmine/db/migrate/20131005100610_add_repositories_created_on.rb +0 -9
  893. data/spec/redmine/db/migrate/20131124175346_add_custom_fields_format_store.rb +0 -9
  894. data/spec/redmine/db/migrate/20131210180802_add_custom_fields_description.rb +0 -9
  895. data/spec/redmine/db/migrate/20131214094309_remove_custom_fields_min_max_length_default_values.rb +0 -15
  896. data/spec/redmine/db/migrate/20131215104612_store_relation_type_in_journal_details.rb +0 -26
  897. data/spec/redmine/db/migrate/20131218183023_delete_orphan_time_entries_custom_values.rb +0 -9
  898. data/spec/redmine/db/migrate/20140228130325_change_changesets_comments_limit.rb +0 -12
  899. data/spec/redmine/db/migrate/20140903143914_add_password_changed_at_to_user.rb +0 -5
  900. data/spec/redmine/db/migrate/20140920094058_insert_builtin_groups.rb +0 -21
  901. data/spec/redmine/db/migrate/20141029181752_add_trackers_default_status_id.rb +0 -15
  902. data/spec/redmine/db/migrate/20141029181824_remove_issue_statuses_is_default.rb +0 -12
  903. data/spec/redmine/db/migrate/20141109112308_add_roles_users_visibility.rb +0 -9
  904. data/spec/redmine/db/migrate/20141122124142_add_wiki_redirects_redirects_to_wiki_id.rb +0 -11
  905. data/spec/redmine/db/migrate/20150113194759_create_email_addresses.rb +0 -12
  906. data/spec/redmine/db/migrate/20150113211532_populate_email_addresses.rb +0 -14
  907. data/spec/redmine/db/migrate/20150113213922_remove_users_mail.rb +0 -13
  908. data/spec/redmine/db/migrate/20150113213955_add_email_addresses_user_id_index.rb +0 -9
  909. data/spec/redmine/db/migrate/20150208105930_replace_move_issues_permission.rb +0 -19
  910. data/spec/redmine/db/migrate/20150510083747_change_documents_title_limit.rb +0 -9
  911. data/spec/redmine/db/migrate/20150525103953_clear_estimated_hours_on_parent_issues.rb +0 -15
  912. data/spec/redmine/db/migrate/20150526183158_add_roles_time_entries_visibility.rb +0 -9
  913. data/spec/redmine/db/migrate/20150528084820_add_roles_all_roles_managed.rb +0 -5
  914. data/spec/redmine/db/migrate/20150528092912_create_roles_managed_roles.rb +0 -8
  915. data/spec/redmine/db/migrate/20150528093249_add_unique_index_on_roles_managed_roles.rb +0 -5
  916. data/spec/redmine/doc/CHANGELOG +0 -3019
  917. data/spec/redmine/doc/COPYING +0 -339
  918. data/spec/redmine/doc/INSTALL +0 -106
  919. data/spec/redmine/doc/README_FOR_APP +0 -28
  920. data/spec/redmine/doc/RUNNING_TESTS +0 -70
  921. data/spec/redmine/doc/UPGRADING +0 -84
  922. data/spec/redmine/extra/mail_handler/rdm-mailhandler.rb +0 -183
  923. data/spec/redmine/extra/sample_plugin/README +0 -15
  924. data/spec/redmine/extra/sample_plugin/app/controllers/example_controller.rb +0 -20
  925. data/spec/redmine/extra/sample_plugin/app/models/meeting.rb +0 -12
  926. data/spec/redmine/extra/sample_plugin/app/views/example/say_goodbye.html.erb +0 -7
  927. data/spec/redmine/extra/sample_plugin/app/views/example/say_hello.html.erb +0 -15
  928. data/spec/redmine/extra/sample_plugin/app/views/my/blocks/_sample_block.html.erb +0 -3
  929. data/spec/redmine/extra/sample_plugin/app/views/settings/_sample_plugin_settings.html.erb +0 -3
  930. data/spec/redmine/extra/sample_plugin/assets/images/it_works.png +0 -0
  931. data/spec/redmine/extra/sample_plugin/assets/stylesheets/example.css +0 -1
  932. data/spec/redmine/extra/sample_plugin/config/locales/en.yml +0 -6
  933. data/spec/redmine/extra/sample_plugin/config/locales/fr.yml +0 -6
  934. data/spec/redmine/extra/sample_plugin/config/routes.rb +0 -7
  935. data/spec/redmine/extra/sample_plugin/db/migrate/001_create_meetings.rb +0 -15
  936. data/spec/redmine/extra/sample_plugin/init.rb +0 -27
  937. data/spec/redmine/extra/sample_plugin/test/integration/routing_test.rb +0 -12
  938. data/spec/redmine/extra/svn/Redmine.pm +0 -554
  939. data/spec/redmine/extra/svn/reposman.rb +0 -289
  940. data/spec/redmine/files/delete.me +0 -1
  941. data/spec/redmine/lib/SVG/GPL.txt +0 -340
  942. data/spec/redmine/lib/SVG/Graph/Bar.rb +0 -148
  943. data/spec/redmine/lib/SVG/Graph/BarBase.rb +0 -139
  944. data/spec/redmine/lib/SVG/Graph/BarHorizontal.rb +0 -149
  945. data/spec/redmine/lib/SVG/Graph/Graph.rb +0 -977
  946. data/spec/redmine/lib/SVG/Graph/Line.rb +0 -444
  947. data/spec/redmine/lib/SVG/Graph/Pie.rb +0 -395
  948. data/spec/redmine/lib/SVG/Graph/Plot.rb +0 -500
  949. data/spec/redmine/lib/SVG/Graph/Schedule.rb +0 -373
  950. data/spec/redmine/lib/SVG/Graph/TimeSeries.rb +0 -238
  951. data/spec/redmine/lib/SVG/LICENSE.txt +0 -57
  952. data/spec/redmine/lib/diff.rb +0 -282
  953. data/spec/redmine/lib/generators/redmine_plugin/USAGE +0 -26
  954. data/spec/redmine/lib/generators/redmine_plugin/redmine_plugin_generator.rb +0 -37
  955. data/spec/redmine/lib/generators/redmine_plugin/templates/README.rdoc +0 -3
  956. data/spec/redmine/lib/generators/redmine_plugin/templates/en_rails_i18n.yml +0 -3
  957. data/spec/redmine/lib/generators/redmine_plugin/templates/init.rb.erb +0 -8
  958. data/spec/redmine/lib/generators/redmine_plugin/templates/routes.rb +0 -2
  959. data/spec/redmine/lib/generators/redmine_plugin/templates/test_helper.rb.erb +0 -2
  960. data/spec/redmine/lib/generators/redmine_plugin_controller/USAGE +0 -5
  961. data/spec/redmine/lib/generators/redmine_plugin_controller/redmine_plugin_controller_generator.rb +0 -27
  962. data/spec/redmine/lib/generators/redmine_plugin_controller/templates/controller.rb.erb +0 -9
  963. data/spec/redmine/lib/generators/redmine_plugin_controller/templates/functional_test.rb.erb +0 -8
  964. data/spec/redmine/lib/generators/redmine_plugin_controller/templates/helper.rb.erb +0 -2
  965. data/spec/redmine/lib/generators/redmine_plugin_controller/templates/view.html.erb +0 -1
  966. data/spec/redmine/lib/generators/redmine_plugin_model/USAGE +0 -5
  967. data/spec/redmine/lib/generators/redmine_plugin_model/redmine_plugin_model_generator.rb +0 -41
  968. data/spec/redmine/lib/generators/redmine_plugin_model/templates/migration.rb +0 -15
  969. data/spec/redmine/lib/generators/redmine_plugin_model/templates/model.rb.erb +0 -3
  970. data/spec/redmine/lib/generators/redmine_plugin_model/templates/unit_test.rb.erb +0 -9
  971. data/spec/redmine/lib/plugins/acts_as_activity_provider/init.rb +0 -2
  972. data/spec/redmine/lib/plugins/acts_as_activity_provider/lib/acts_as_activity_provider.rb +0 -87
  973. data/spec/redmine/lib/plugins/acts_as_attachable/init.rb +0 -2
  974. data/spec/redmine/lib/plugins/acts_as_attachable/lib/acts_as_attachable.rb +0 -120
  975. data/spec/redmine/lib/plugins/acts_as_customizable/init.rb +0 -2
  976. data/spec/redmine/lib/plugins/acts_as_customizable/lib/acts_as_customizable.rb +0 -170
  977. data/spec/redmine/lib/plugins/acts_as_event/init.rb +0 -2
  978. data/spec/redmine/lib/plugins/acts_as_event/lib/acts_as_event.rb +0 -96
  979. data/spec/redmine/lib/plugins/acts_as_list/README +0 -23
  980. data/spec/redmine/lib/plugins/acts_as_list/init.rb +0 -3
  981. data/spec/redmine/lib/plugins/acts_as_list/lib/active_record/acts/list.rb +0 -280
  982. data/spec/redmine/lib/plugins/acts_as_list/test/list_test.rb +0 -332
  983. data/spec/redmine/lib/plugins/acts_as_searchable/init.rb +0 -2
  984. data/spec/redmine/lib/plugins/acts_as_searchable/lib/acts_as_searchable.rb +0 -225
  985. data/spec/redmine/lib/plugins/acts_as_tree/README +0 -26
  986. data/spec/redmine/lib/plugins/acts_as_tree/Rakefile +0 -22
  987. data/spec/redmine/lib/plugins/acts_as_tree/init.rb +0 -1
  988. data/spec/redmine/lib/plugins/acts_as_tree/lib/active_record/acts/tree.rb +0 -109
  989. data/spec/redmine/lib/plugins/acts_as_tree/test/abstract_unit.rb +0 -0
  990. data/spec/redmine/lib/plugins/acts_as_tree/test/acts_as_tree_test.rb +0 -219
  991. data/spec/redmine/lib/plugins/acts_as_tree/test/database.yml +0 -0
  992. data/spec/redmine/lib/plugins/acts_as_tree/test/fixtures/mixin.rb +0 -0
  993. data/spec/redmine/lib/plugins/acts_as_tree/test/fixtures/mixins.yml +0 -0
  994. data/spec/redmine/lib/plugins/acts_as_tree/test/schema.rb +0 -0
  995. data/spec/redmine/lib/plugins/acts_as_versioned/CHANGELOG +0 -74
  996. data/spec/redmine/lib/plugins/acts_as_versioned/MIT-LICENSE +0 -20
  997. data/spec/redmine/lib/plugins/acts_as_versioned/README +0 -28
  998. data/spec/redmine/lib/plugins/acts_as_versioned/RUNNING_UNIT_TESTS +0 -41
  999. data/spec/redmine/lib/plugins/acts_as_versioned/Rakefile +0 -182
  1000. data/spec/redmine/lib/plugins/acts_as_versioned/init.rb +0 -1
  1001. data/spec/redmine/lib/plugins/acts_as_versioned/lib/acts_as_versioned.rb +0 -568
  1002. data/spec/redmine/lib/plugins/acts_as_versioned/test/abstract_unit.rb +0 -41
  1003. data/spec/redmine/lib/plugins/acts_as_versioned/test/database.yml +0 -18
  1004. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/authors.yml +0 -6
  1005. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/landmark.rb +0 -3
  1006. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/landmark_versions.yml +0 -7
  1007. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/landmarks.yml +0 -6
  1008. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/locked_pages.yml +0 -10
  1009. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/locked_pages_revisions.yml +0 -27
  1010. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/migrations/1_add_versioned_tables.rb +0 -13
  1011. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/page.rb +0 -43
  1012. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/page_versions.yml +0 -16
  1013. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/pages.yml +0 -7
  1014. data/spec/redmine/lib/plugins/acts_as_versioned/test/fixtures/widget.rb +0 -6
  1015. data/spec/redmine/lib/plugins/acts_as_versioned/test/migration_test.rb +0 -46
  1016. data/spec/redmine/lib/plugins/acts_as_versioned/test/schema.rb +0 -68
  1017. data/spec/redmine/lib/plugins/acts_as_versioned/test/versioned_test.rb +0 -347
  1018. data/spec/redmine/lib/plugins/acts_as_watchable/init.rb +0 -3
  1019. data/spec/redmine/lib/plugins/acts_as_watchable/lib/acts_as_watchable.rb +0 -88
  1020. data/spec/redmine/lib/plugins/gravatar/MIT-LICENSE +0 -20
  1021. data/spec/redmine/lib/plugins/gravatar/README.rdoc +0 -55
  1022. data/spec/redmine/lib/plugins/gravatar/Rakefile +0 -32
  1023. data/spec/redmine/lib/plugins/gravatar/about.yml +0 -7
  1024. data/spec/redmine/lib/plugins/gravatar/init.rb +0 -2
  1025. data/spec/redmine/lib/plugins/gravatar/lib/gravatar.rb +0 -88
  1026. data/spec/redmine/lib/plugins/gravatar/spec/gravatar_spec.rb +0 -43
  1027. data/spec/redmine/lib/plugins/open_id_authentication/CHANGELOG +0 -37
  1028. data/spec/redmine/lib/plugins/open_id_authentication/README +0 -223
  1029. data/spec/redmine/lib/plugins/open_id_authentication/Rakefile +0 -22
  1030. data/spec/redmine/lib/plugins/open_id_authentication/generators/open_id_authentication_tables/open_id_authentication_tables_generator.rb +0 -11
  1031. data/spec/redmine/lib/plugins/open_id_authentication/generators/open_id_authentication_tables/templates/migration.rb +0 -20
  1032. data/spec/redmine/lib/plugins/open_id_authentication/generators/upgrade_open_id_authentication_tables/templates/migration.rb +0 -26
  1033. data/spec/redmine/lib/plugins/open_id_authentication/generators/upgrade_open_id_authentication_tables/upgrade_open_id_authentication_tables_generator.rb +0 -11
  1034. data/spec/redmine/lib/plugins/open_id_authentication/init.rb +0 -12
  1035. data/spec/redmine/lib/plugins/open_id_authentication/lib/open_id_authentication.rb +0 -159
  1036. data/spec/redmine/lib/plugins/open_id_authentication/lib/open_id_authentication/association.rb +0 -9
  1037. data/spec/redmine/lib/plugins/open_id_authentication/lib/open_id_authentication/db_store.rb +0 -55
  1038. data/spec/redmine/lib/plugins/open_id_authentication/lib/open_id_authentication/mem_cache_store.rb +0 -73
  1039. data/spec/redmine/lib/plugins/open_id_authentication/lib/open_id_authentication/nonce.rb +0 -5
  1040. data/spec/redmine/lib/plugins/open_id_authentication/lib/open_id_authentication/request.rb +0 -23
  1041. data/spec/redmine/lib/plugins/open_id_authentication/lib/open_id_authentication/timeout_fixes.rb +0 -20
  1042. data/spec/redmine/lib/plugins/open_id_authentication/lib/tasks/open_id_authentication_tasks.rake +0 -30
  1043. data/spec/redmine/lib/plugins/open_id_authentication/test/mem_cache_store_test.rb +0 -151
  1044. data/spec/redmine/lib/plugins/open_id_authentication/test/normalize_test.rb +0 -32
  1045. data/spec/redmine/lib/plugins/open_id_authentication/test/open_id_authentication_test.rb +0 -46
  1046. data/spec/redmine/lib/plugins/open_id_authentication/test/status_test.rb +0 -14
  1047. data/spec/redmine/lib/plugins/open_id_authentication/test/test_helper.rb +0 -17
  1048. data/spec/redmine/lib/redcloth3.rb +0 -1208
  1049. data/spec/redmine/lib/redmine.rb +0 -274
  1050. data/spec/redmine/lib/redmine/access_control.rb +0 -137
  1051. data/spec/redmine/lib/redmine/access_keys.rb +0 -33
  1052. data/spec/redmine/lib/redmine/activity.rb +0 -52
  1053. data/spec/redmine/lib/redmine/activity/fetcher.rb +0 -110
  1054. data/spec/redmine/lib/redmine/ciphering.rb +0 -103
  1055. data/spec/redmine/lib/redmine/codeset_util.rb +0 -72
  1056. data/spec/redmine/lib/redmine/configuration.rb +0 -128
  1057. data/spec/redmine/lib/redmine/core_ext.rb +0 -1
  1058. data/spec/redmine/lib/redmine/core_ext/active_record.rb +0 -27
  1059. data/spec/redmine/lib/redmine/core_ext/date.rb +0 -5
  1060. data/spec/redmine/lib/redmine/core_ext/date/calculations.rb +0 -35
  1061. data/spec/redmine/lib/redmine/core_ext/string.rb +0 -11
  1062. data/spec/redmine/lib/redmine/core_ext/string/conversions.rb +0 -42
  1063. data/spec/redmine/lib/redmine/core_ext/string/inflections.rb +0 -29
  1064. data/spec/redmine/lib/redmine/database.rb +0 -53
  1065. data/spec/redmine/lib/redmine/default_data/loader.rb +0 -186
  1066. data/spec/redmine/lib/redmine/export/csv.rb +0 -65
  1067. data/spec/redmine/lib/redmine/export/pdf.rb +0 -153
  1068. data/spec/redmine/lib/redmine/export/pdf/issues_pdf_helper.rb +0 -518
  1069. data/spec/redmine/lib/redmine/export/pdf/wiki_pdf_helper.rb +0 -98
  1070. data/spec/redmine/lib/redmine/field_format.rb +0 -718
  1071. data/spec/redmine/lib/redmine/helpers/calendar.rb +0 -85
  1072. data/spec/redmine/lib/redmine/helpers/diff.rb +0 -75
  1073. data/spec/redmine/lib/redmine/helpers/gantt.rb +0 -929
  1074. data/spec/redmine/lib/redmine/helpers/time_report.rb +0 -152
  1075. data/spec/redmine/lib/redmine/hook.rb +0 -175
  1076. data/spec/redmine/lib/redmine/i18n.rb +0 -195
  1077. data/spec/redmine/lib/redmine/imap.rb +0 -66
  1078. data/spec/redmine/lib/redmine/info.rb +0 -37
  1079. data/spec/redmine/lib/redmine/menu_manager.rb +0 -454
  1080. data/spec/redmine/lib/redmine/mime_type.rb +0 -89
  1081. data/spec/redmine/lib/redmine/nested_set/issue_nested_set.rb +0 -200
  1082. data/spec/redmine/lib/redmine/nested_set/project_nested_set.rb +0 -159
  1083. data/spec/redmine/lib/redmine/nested_set/traversing.rb +0 -124
  1084. data/spec/redmine/lib/redmine/notifiable.rb +0 -27
  1085. data/spec/redmine/lib/redmine/pagination.rb +0 -246
  1086. data/spec/redmine/lib/redmine/platform.rb +0 -27
  1087. data/spec/redmine/lib/redmine/plugin.rb +0 -504
  1088. data/spec/redmine/lib/redmine/pop3.rb +0 -74
  1089. data/spec/redmine/lib/redmine/safe_attributes.rb +0 -87
  1090. data/spec/redmine/lib/redmine/scm/adapters.rb +0 -25
  1091. data/spec/redmine/lib/redmine/scm/adapters/abstract_adapter.rb +0 -435
  1092. data/spec/redmine/lib/redmine/scm/adapters/bazaar_adapter.rb +0 -338
  1093. data/spec/redmine/lib/redmine/scm/adapters/cvs_adapter.rb +0 -459
  1094. data/spec/redmine/lib/redmine/scm/adapters/darcs_adapter.rb +0 -239
  1095. data/spec/redmine/lib/redmine/scm/adapters/filesystem_adapter.rb +0 -118
  1096. data/spec/redmine/lib/redmine/scm/adapters/git_adapter.rb +0 -408
  1097. data/spec/redmine/lib/redmine/scm/adapters/mercurial/hg-template-1.0.tmpl +0 -12
  1098. data/spec/redmine/lib/redmine/scm/adapters/mercurial/redminehelper.py +0 -225
  1099. data/spec/redmine/lib/redmine/scm/adapters/mercurial_adapter.rb +0 -329
  1100. data/spec/redmine/lib/redmine/scm/adapters/subversion_adapter.rb +0 -276
  1101. data/spec/redmine/lib/redmine/scm/base.rb +0 -23
  1102. data/spec/redmine/lib/redmine/search.rb +0 -173
  1103. data/spec/redmine/lib/redmine/subclass_factory.rb +0 -47
  1104. data/spec/redmine/lib/redmine/sudo_mode.rb +0 -224
  1105. data/spec/redmine/lib/redmine/syntax_highlighting.rb +0 -66
  1106. data/spec/redmine/lib/redmine/themes.rb +0 -143
  1107. data/spec/redmine/lib/redmine/thumbnail.rb +0 -55
  1108. data/spec/redmine/lib/redmine/unified_diff.rb +0 -284
  1109. data/spec/redmine/lib/redmine/utils.rb +0 -118
  1110. data/spec/redmine/lib/redmine/version.rb +0 -37
  1111. data/spec/redmine/lib/redmine/views/api_template_handler.rb +0 -26
  1112. data/spec/redmine/lib/redmine/views/builders.rb +0 -38
  1113. data/spec/redmine/lib/redmine/views/builders/json.rb +0 -45
  1114. data/spec/redmine/lib/redmine/views/builders/structure.rb +0 -94
  1115. data/spec/redmine/lib/redmine/views/builders/xml.rb +0 -48
  1116. data/spec/redmine/lib/redmine/views/labelled_form_builder.rb +0 -55
  1117. data/spec/redmine/lib/redmine/views/my_page/block.rb +0 -32
  1118. data/spec/redmine/lib/redmine/views/other_formats_builder.rb +0 -33
  1119. data/spec/redmine/lib/redmine/wiki_formatting.rb +0 -200
  1120. data/spec/redmine/lib/redmine/wiki_formatting/html_parser.rb +0 -62
  1121. data/spec/redmine/lib/redmine/wiki_formatting/macros.rb +0 -256
  1122. data/spec/redmine/lib/redmine/wiki_formatting/markdown/formatter.rb +0 -137
  1123. data/spec/redmine/lib/redmine/wiki_formatting/markdown/helper.rb +0 -46
  1124. data/spec/redmine/lib/redmine/wiki_formatting/markdown/html_parser.rb +0 -39
  1125. data/spec/redmine/lib/redmine/wiki_formatting/textile/formatter.rb +0 -134
  1126. data/spec/redmine/lib/redmine/wiki_formatting/textile/helper.rb +0 -46
  1127. data/spec/redmine/lib/redmine/wiki_formatting/textile/html_parser.rb +0 -40
  1128. data/spec/redmine/lib/tasks/ci.rake +0 -97
  1129. data/spec/redmine/lib/tasks/ciphering.rake +0 -35
  1130. data/spec/redmine/lib/tasks/deprecated.rake +0 -13
  1131. data/spec/redmine/lib/tasks/email.rake +0 -185
  1132. data/spec/redmine/lib/tasks/extract_fixtures.rake +0 -22
  1133. data/spec/redmine/lib/tasks/initializers.rake +0 -24
  1134. data/spec/redmine/lib/tasks/load_default_data.rake +0 -36
  1135. data/spec/redmine/lib/tasks/locales.rake +0 -180
  1136. data/spec/redmine/lib/tasks/metrics.rake +0 -6
  1137. data/spec/redmine/lib/tasks/migrate_from_mantis.rake +0 -516
  1138. data/spec/redmine/lib/tasks/migrate_from_trac.rake +0 -777
  1139. data/spec/redmine/lib/tasks/permissions.rake +0 -9
  1140. data/spec/redmine/lib/tasks/redmine.rake +0 -179
  1141. data/spec/redmine/lib/tasks/reminder.rake +0 -45
  1142. data/spec/redmine/lib/tasks/testing.rake +0 -110
  1143. data/spec/redmine/lib/tasks/yardoc.rake +0 -21
  1144. data/spec/redmine/log/delete.me +0 -1
  1145. data/spec/redmine/plugins/README +0 -1
  1146. data/spec/redmine/public/404.html +0 -17
  1147. data/spec/redmine/public/500.html +0 -19
  1148. data/spec/redmine/public/dispatch.fcgi.example +0 -20
  1149. data/spec/redmine/public/favicon.ico +0 -0
  1150. data/spec/redmine/public/help/ar/wiki_syntax_detailed_markdown.html +0 -329
  1151. data/spec/redmine/public/help/ar/wiki_syntax_detailed_textile.html +0 -333
  1152. data/spec/redmine/public/help/ar/wiki_syntax_markdown.html +0 -82
  1153. data/spec/redmine/public/help/ar/wiki_syntax_textile.html +0 -85
  1154. data/spec/redmine/public/help/az/wiki_syntax_detailed_markdown.html +0 -329
  1155. data/spec/redmine/public/help/az/wiki_syntax_detailed_textile.html +0 -333
  1156. data/spec/redmine/public/help/az/wiki_syntax_markdown.html +0 -82
  1157. data/spec/redmine/public/help/az/wiki_syntax_textile.html +0 -85
  1158. data/spec/redmine/public/help/bg/wiki_syntax_detailed_markdown.html +0 -329
  1159. data/spec/redmine/public/help/bg/wiki_syntax_detailed_textile.html +0 -333
  1160. data/spec/redmine/public/help/bg/wiki_syntax_markdown.html +0 -82
  1161. data/spec/redmine/public/help/bg/wiki_syntax_textile.html +0 -85
  1162. data/spec/redmine/public/help/bs/wiki_syntax_detailed_markdown.html +0 -329
  1163. data/spec/redmine/public/help/bs/wiki_syntax_detailed_textile.html +0 -333
  1164. data/spec/redmine/public/help/bs/wiki_syntax_markdown.html +0 -82
  1165. data/spec/redmine/public/help/bs/wiki_syntax_textile.html +0 -85
  1166. data/spec/redmine/public/help/ca/wiki_syntax_detailed_markdown.html +0 -329
  1167. data/spec/redmine/public/help/ca/wiki_syntax_detailed_textile.html +0 -333
  1168. data/spec/redmine/public/help/ca/wiki_syntax_markdown.html +0 -82
  1169. data/spec/redmine/public/help/ca/wiki_syntax_textile.html +0 -85
  1170. data/spec/redmine/public/help/cs/wiki_syntax_detailed_markdown.html +0 -329
  1171. data/spec/redmine/public/help/cs/wiki_syntax_detailed_textile.html +0 -333
  1172. data/spec/redmine/public/help/cs/wiki_syntax_markdown.html +0 -82
  1173. data/spec/redmine/public/help/cs/wiki_syntax_textile.html +0 -85
  1174. data/spec/redmine/public/help/da/wiki_syntax_detailed_markdown.html +0 -329
  1175. data/spec/redmine/public/help/da/wiki_syntax_detailed_textile.html +0 -333
  1176. data/spec/redmine/public/help/da/wiki_syntax_markdown.html +0 -82
  1177. data/spec/redmine/public/help/da/wiki_syntax_textile.html +0 -85
  1178. data/spec/redmine/public/help/de/wiki_syntax_detailed_markdown.html +0 -329
  1179. data/spec/redmine/public/help/de/wiki_syntax_detailed_textile.html +0 -333
  1180. data/spec/redmine/public/help/de/wiki_syntax_markdown.html +0 -82
  1181. data/spec/redmine/public/help/de/wiki_syntax_textile.html +0 -85
  1182. data/spec/redmine/public/help/el/wiki_syntax_detailed_markdown.html +0 -329
  1183. data/spec/redmine/public/help/el/wiki_syntax_detailed_textile.html +0 -333
  1184. data/spec/redmine/public/help/el/wiki_syntax_markdown.html +0 -82
  1185. data/spec/redmine/public/help/el/wiki_syntax_textile.html +0 -85
  1186. data/spec/redmine/public/help/en-gb/wiki_syntax_detailed_markdown.html +0 -329
  1187. data/spec/redmine/public/help/en-gb/wiki_syntax_detailed_textile.html +0 -333
  1188. data/spec/redmine/public/help/en-gb/wiki_syntax_markdown.html +0 -82
  1189. data/spec/redmine/public/help/en-gb/wiki_syntax_textile.html +0 -85
  1190. data/spec/redmine/public/help/en/wiki_syntax_detailed_markdown.html +0 -329
  1191. data/spec/redmine/public/help/en/wiki_syntax_detailed_textile.html +0 -333
  1192. data/spec/redmine/public/help/en/wiki_syntax_markdown.html +0 -82
  1193. data/spec/redmine/public/help/en/wiki_syntax_textile.html +0 -85
  1194. data/spec/redmine/public/help/es-pa/wiki_syntax_detailed_markdown.html +0 -329
  1195. data/spec/redmine/public/help/es-pa/wiki_syntax_detailed_textile.html +0 -333
  1196. data/spec/redmine/public/help/es-pa/wiki_syntax_markdown.html +0 -82
  1197. data/spec/redmine/public/help/es-pa/wiki_syntax_textile.html +0 -86
  1198. data/spec/redmine/public/help/es/wiki_syntax_detailed_markdown.html +0 -329
  1199. data/spec/redmine/public/help/es/wiki_syntax_detailed_textile.html +0 -333
  1200. data/spec/redmine/public/help/es/wiki_syntax_markdown.html +0 -82
  1201. data/spec/redmine/public/help/es/wiki_syntax_textile.html +0 -86
  1202. data/spec/redmine/public/help/et/wiki_syntax_detailed_markdown.html +0 -329
  1203. data/spec/redmine/public/help/et/wiki_syntax_detailed_textile.html +0 -333
  1204. data/spec/redmine/public/help/et/wiki_syntax_markdown.html +0 -82
  1205. data/spec/redmine/public/help/et/wiki_syntax_textile.html +0 -85
  1206. data/spec/redmine/public/help/eu/wiki_syntax_detailed_markdown.html +0 -329
  1207. data/spec/redmine/public/help/eu/wiki_syntax_detailed_textile.html +0 -333
  1208. data/spec/redmine/public/help/eu/wiki_syntax_markdown.html +0 -82
  1209. data/spec/redmine/public/help/eu/wiki_syntax_textile.html +0 -85
  1210. data/spec/redmine/public/help/fa/wiki_syntax_detailed_markdown.html +0 -329
  1211. data/spec/redmine/public/help/fa/wiki_syntax_detailed_textile.html +0 -333
  1212. data/spec/redmine/public/help/fa/wiki_syntax_markdown.html +0 -82
  1213. data/spec/redmine/public/help/fa/wiki_syntax_textile.html +0 -85
  1214. data/spec/redmine/public/help/fi/wiki_syntax_detailed_markdown.html +0 -329
  1215. data/spec/redmine/public/help/fi/wiki_syntax_detailed_textile.html +0 -333
  1216. data/spec/redmine/public/help/fi/wiki_syntax_markdown.html +0 -82
  1217. data/spec/redmine/public/help/fi/wiki_syntax_textile.html +0 -85
  1218. data/spec/redmine/public/help/fr/wiki_syntax_detailed_markdown.html +0 -329
  1219. data/spec/redmine/public/help/fr/wiki_syntax_detailed_textile.html +0 -333
  1220. data/spec/redmine/public/help/fr/wiki_syntax_markdown.html +0 -82
  1221. data/spec/redmine/public/help/fr/wiki_syntax_textile.html +0 -85
  1222. data/spec/redmine/public/help/gl/wiki_syntax_detailed_markdown.html +0 -329
  1223. data/spec/redmine/public/help/gl/wiki_syntax_detailed_textile.html +0 -333
  1224. data/spec/redmine/public/help/gl/wiki_syntax_markdown.html +0 -82
  1225. data/spec/redmine/public/help/gl/wiki_syntax_textile.html +0 -85
  1226. data/spec/redmine/public/help/he/wiki_syntax_detailed_markdown.html +0 -329
  1227. data/spec/redmine/public/help/he/wiki_syntax_detailed_textile.html +0 -333
  1228. data/spec/redmine/public/help/he/wiki_syntax_markdown.html +0 -82
  1229. data/spec/redmine/public/help/he/wiki_syntax_textile.html +0 -85
  1230. data/spec/redmine/public/help/hr/wiki_syntax_detailed_markdown.html +0 -329
  1231. data/spec/redmine/public/help/hr/wiki_syntax_detailed_textile.html +0 -333
  1232. data/spec/redmine/public/help/hr/wiki_syntax_markdown.html +0 -82
  1233. data/spec/redmine/public/help/hr/wiki_syntax_textile.html +0 -85
  1234. data/spec/redmine/public/help/hu/wiki_syntax_detailed_markdown.html +0 -329
  1235. data/spec/redmine/public/help/hu/wiki_syntax_detailed_textile.html +0 -333
  1236. data/spec/redmine/public/help/hu/wiki_syntax_markdown.html +0 -82
  1237. data/spec/redmine/public/help/hu/wiki_syntax_textile.html +0 -85
  1238. data/spec/redmine/public/help/id/wiki_syntax_detailed_markdown.html +0 -329
  1239. data/spec/redmine/public/help/id/wiki_syntax_detailed_textile.html +0 -333
  1240. data/spec/redmine/public/help/id/wiki_syntax_markdown.html +0 -82
  1241. data/spec/redmine/public/help/id/wiki_syntax_textile.html +0 -85
  1242. data/spec/redmine/public/help/it/wiki_syntax_detailed_markdown.html +0 -329
  1243. data/spec/redmine/public/help/it/wiki_syntax_detailed_textile.html +0 -333
  1244. data/spec/redmine/public/help/it/wiki_syntax_markdown.html +0 -82
  1245. data/spec/redmine/public/help/it/wiki_syntax_textile.html +0 -85
  1246. data/spec/redmine/public/help/ja/wiki_syntax_detailed_markdown.html +0 -329
  1247. data/spec/redmine/public/help/ja/wiki_syntax_detailed_textile.html +0 -333
  1248. data/spec/redmine/public/help/ja/wiki_syntax_markdown.html +0 -82
  1249. data/spec/redmine/public/help/ja/wiki_syntax_textile.html +0 -85
  1250. data/spec/redmine/public/help/ko/wiki_syntax_detailed_markdown.html +0 -329
  1251. data/spec/redmine/public/help/ko/wiki_syntax_detailed_textile.html +0 -333
  1252. data/spec/redmine/public/help/ko/wiki_syntax_markdown.html +0 -82
  1253. data/spec/redmine/public/help/ko/wiki_syntax_textile.html +0 -85
  1254. data/spec/redmine/public/help/lt/wiki_syntax_detailed_markdown.html +0 -329
  1255. data/spec/redmine/public/help/lt/wiki_syntax_detailed_textile.html +0 -333
  1256. data/spec/redmine/public/help/lt/wiki_syntax_markdown.html +0 -82
  1257. data/spec/redmine/public/help/lt/wiki_syntax_textile.html +0 -85
  1258. data/spec/redmine/public/help/lv/wiki_syntax_detailed_markdown.html +0 -329
  1259. data/spec/redmine/public/help/lv/wiki_syntax_detailed_textile.html +0 -333
  1260. data/spec/redmine/public/help/lv/wiki_syntax_markdown.html +0 -82
  1261. data/spec/redmine/public/help/lv/wiki_syntax_textile.html +0 -85
  1262. data/spec/redmine/public/help/mk/wiki_syntax_detailed_markdown.html +0 -329
  1263. data/spec/redmine/public/help/mk/wiki_syntax_detailed_textile.html +0 -333
  1264. data/spec/redmine/public/help/mk/wiki_syntax_markdown.html +0 -82
  1265. data/spec/redmine/public/help/mk/wiki_syntax_textile.html +0 -85
  1266. data/spec/redmine/public/help/mn/wiki_syntax_detailed_markdown.html +0 -329
  1267. data/spec/redmine/public/help/mn/wiki_syntax_detailed_textile.html +0 -333
  1268. data/spec/redmine/public/help/mn/wiki_syntax_markdown.html +0 -82
  1269. data/spec/redmine/public/help/mn/wiki_syntax_textile.html +0 -85
  1270. data/spec/redmine/public/help/nl/wiki_syntax_detailed_markdown.html +0 -329
  1271. data/spec/redmine/public/help/nl/wiki_syntax_detailed_textile.html +0 -333
  1272. data/spec/redmine/public/help/nl/wiki_syntax_markdown.html +0 -82
  1273. data/spec/redmine/public/help/nl/wiki_syntax_textile.html +0 -85
  1274. data/spec/redmine/public/help/no/wiki_syntax_detailed_markdown.html +0 -329
  1275. data/spec/redmine/public/help/no/wiki_syntax_detailed_textile.html +0 -333
  1276. data/spec/redmine/public/help/no/wiki_syntax_markdown.html +0 -82
  1277. data/spec/redmine/public/help/no/wiki_syntax_textile.html +0 -85
  1278. data/spec/redmine/public/help/pl/wiki_syntax_detailed_markdown.html +0 -329
  1279. data/spec/redmine/public/help/pl/wiki_syntax_detailed_textile.html +0 -333
  1280. data/spec/redmine/public/help/pl/wiki_syntax_markdown.html +0 -82
  1281. data/spec/redmine/public/help/pl/wiki_syntax_textile.html +0 -85
  1282. data/spec/redmine/public/help/pt-br/wiki_syntax_detailed_markdown.html +0 -329
  1283. data/spec/redmine/public/help/pt-br/wiki_syntax_detailed_textile.html +0 -333
  1284. data/spec/redmine/public/help/pt-br/wiki_syntax_markdown.html +0 -82
  1285. data/spec/redmine/public/help/pt-br/wiki_syntax_textile.html +0 -85
  1286. data/spec/redmine/public/help/pt/wiki_syntax_detailed_markdown.html +0 -329
  1287. data/spec/redmine/public/help/pt/wiki_syntax_detailed_textile.html +0 -333
  1288. data/spec/redmine/public/help/pt/wiki_syntax_markdown.html +0 -82
  1289. data/spec/redmine/public/help/pt/wiki_syntax_textile.html +0 -85
  1290. data/spec/redmine/public/help/ro/wiki_syntax_detailed_markdown.html +0 -329
  1291. data/spec/redmine/public/help/ro/wiki_syntax_detailed_textile.html +0 -333
  1292. data/spec/redmine/public/help/ro/wiki_syntax_markdown.html +0 -82
  1293. data/spec/redmine/public/help/ro/wiki_syntax_textile.html +0 -85
  1294. data/spec/redmine/public/help/ru/wiki_syntax_detailed_markdown.html +0 -329
  1295. data/spec/redmine/public/help/ru/wiki_syntax_detailed_textile.html +0 -366
  1296. data/spec/redmine/public/help/ru/wiki_syntax_markdown.html +0 -82
  1297. data/spec/redmine/public/help/ru/wiki_syntax_textile.html +0 -170
  1298. data/spec/redmine/public/help/sk/wiki_syntax_detailed_markdown.html +0 -329
  1299. data/spec/redmine/public/help/sk/wiki_syntax_detailed_textile.html +0 -333
  1300. data/spec/redmine/public/help/sk/wiki_syntax_markdown.html +0 -82
  1301. data/spec/redmine/public/help/sk/wiki_syntax_textile.html +0 -85
  1302. data/spec/redmine/public/help/sl/wiki_syntax_detailed_markdown.html +0 -329
  1303. data/spec/redmine/public/help/sl/wiki_syntax_detailed_textile.html +0 -333
  1304. data/spec/redmine/public/help/sl/wiki_syntax_markdown.html +0 -82
  1305. data/spec/redmine/public/help/sl/wiki_syntax_textile.html +0 -85
  1306. data/spec/redmine/public/help/sq/wiki_syntax_detailed_markdown.html +0 -329
  1307. data/spec/redmine/public/help/sq/wiki_syntax_detailed_textile.html +0 -333
  1308. data/spec/redmine/public/help/sq/wiki_syntax_markdown.html +0 -82
  1309. data/spec/redmine/public/help/sq/wiki_syntax_textile.html +0 -85
  1310. data/spec/redmine/public/help/sr-yu/wiki_syntax_detailed_markdown.html +0 -329
  1311. data/spec/redmine/public/help/sr-yu/wiki_syntax_detailed_textile.html +0 -333
  1312. data/spec/redmine/public/help/sr-yu/wiki_syntax_markdown.html +0 -82
  1313. data/spec/redmine/public/help/sr-yu/wiki_syntax_textile.html +0 -85
  1314. data/spec/redmine/public/help/sr/wiki_syntax_detailed_markdown.html +0 -329
  1315. data/spec/redmine/public/help/sr/wiki_syntax_detailed_textile.html +0 -333
  1316. data/spec/redmine/public/help/sr/wiki_syntax_markdown.html +0 -82
  1317. data/spec/redmine/public/help/sr/wiki_syntax_textile.html +0 -85
  1318. data/spec/redmine/public/help/sv/wiki_syntax_detailed_markdown.html +0 -329
  1319. data/spec/redmine/public/help/sv/wiki_syntax_detailed_textile.html +0 -333
  1320. data/spec/redmine/public/help/sv/wiki_syntax_markdown.html +0 -82
  1321. data/spec/redmine/public/help/sv/wiki_syntax_textile.html +0 -85
  1322. data/spec/redmine/public/help/th/wiki_syntax_detailed_markdown.html +0 -329
  1323. data/spec/redmine/public/help/th/wiki_syntax_detailed_textile.html +0 -333
  1324. data/spec/redmine/public/help/th/wiki_syntax_markdown.html +0 -82
  1325. data/spec/redmine/public/help/th/wiki_syntax_textile.html +0 -85
  1326. data/spec/redmine/public/help/tr/wiki_syntax_detailed_markdown.html +0 -329
  1327. data/spec/redmine/public/help/tr/wiki_syntax_detailed_textile.html +0 -333
  1328. data/spec/redmine/public/help/tr/wiki_syntax_markdown.html +0 -82
  1329. data/spec/redmine/public/help/tr/wiki_syntax_textile.html +0 -85
  1330. data/spec/redmine/public/help/uk/wiki_syntax_detailed_markdown.html +0 -329
  1331. data/spec/redmine/public/help/uk/wiki_syntax_detailed_textile.html +0 -333
  1332. data/spec/redmine/public/help/uk/wiki_syntax_markdown.html +0 -82
  1333. data/spec/redmine/public/help/uk/wiki_syntax_textile.html +0 -85
  1334. data/spec/redmine/public/help/vi/wiki_syntax_detailed_markdown.html +0 -329
  1335. data/spec/redmine/public/help/vi/wiki_syntax_detailed_textile.html +0 -333
  1336. data/spec/redmine/public/help/vi/wiki_syntax_markdown.html +0 -82
  1337. data/spec/redmine/public/help/vi/wiki_syntax_textile.html +0 -85
  1338. data/spec/redmine/public/help/zh-tw/wiki_syntax_detailed_markdown.html +0 -329
  1339. data/spec/redmine/public/help/zh-tw/wiki_syntax_detailed_textile.html +0 -333
  1340. data/spec/redmine/public/help/zh-tw/wiki_syntax_markdown.html +0 -82
  1341. data/spec/redmine/public/help/zh-tw/wiki_syntax_textile.html +0 -85
  1342. data/spec/redmine/public/help/zh/wiki_syntax_detailed_markdown.html +0 -329
  1343. data/spec/redmine/public/help/zh/wiki_syntax_detailed_textile.html +0 -333
  1344. data/spec/redmine/public/help/zh/wiki_syntax_markdown.html +0 -82
  1345. data/spec/redmine/public/help/zh/wiki_syntax_textile.html +0 -85
  1346. data/spec/redmine/public/htaccess.fcgi.example +0 -49
  1347. data/spec/redmine/public/images/1downarrow.png +0 -0
  1348. data/spec/redmine/public/images/1uparrow.png +0 -0
  1349. data/spec/redmine/public/images/2downarrow.png +0 -0
  1350. data/spec/redmine/public/images/2uparrow.png +0 -0
  1351. data/spec/redmine/public/images/add.png +0 -0
  1352. data/spec/redmine/public/images/arrow_collapsed.png +0 -0
  1353. data/spec/redmine/public/images/arrow_down.png +0 -0
  1354. data/spec/redmine/public/images/arrow_expanded.png +0 -0
  1355. data/spec/redmine/public/images/attachment.png +0 -0
  1356. data/spec/redmine/public/images/bullet_add.png +0 -0
  1357. data/spec/redmine/public/images/bullet_arrow_left.png +0 -0
  1358. data/spec/redmine/public/images/bullet_arrow_right.png +0 -0
  1359. data/spec/redmine/public/images/bullet_black.png +0 -0
  1360. data/spec/redmine/public/images/bullet_blue.png +0 -0
  1361. data/spec/redmine/public/images/bullet_delete.png +0 -0
  1362. data/spec/redmine/public/images/bullet_diamond.png +0 -0
  1363. data/spec/redmine/public/images/bullet_end.png +0 -0
  1364. data/spec/redmine/public/images/bullet_go.png +0 -0
  1365. data/spec/redmine/public/images/bullet_orange.png +0 -0
  1366. data/spec/redmine/public/images/bullet_purple.png +0 -0
  1367. data/spec/redmine/public/images/bullet_toggle_minus.png +0 -0
  1368. data/spec/redmine/public/images/bullet_toggle_plus.png +0 -0
  1369. data/spec/redmine/public/images/calendar.png +0 -0
  1370. data/spec/redmine/public/images/cancel.png +0 -0
  1371. data/spec/redmine/public/images/changeset.png +0 -0
  1372. data/spec/redmine/public/images/close.png +0 -0
  1373. data/spec/redmine/public/images/close_hl.png +0 -0
  1374. data/spec/redmine/public/images/comment.png +0 -0
  1375. data/spec/redmine/public/images/comments.png +0 -0
  1376. data/spec/redmine/public/images/copy.png +0 -0
  1377. data/spec/redmine/public/images/database_key.png +0 -0
  1378. data/spec/redmine/public/images/delete.png +0 -0
  1379. data/spec/redmine/public/images/document.png +0 -0
  1380. data/spec/redmine/public/images/draft.png +0 -0
  1381. data/spec/redmine/public/images/duplicate.png +0 -0
  1382. data/spec/redmine/public/images/edit.png +0 -0
  1383. data/spec/redmine/public/images/email.png +0 -0
  1384. data/spec/redmine/public/images/email_add.png +0 -0
  1385. data/spec/redmine/public/images/email_disabled.png +0 -0
  1386. data/spec/redmine/public/images/exclamation.png +0 -0
  1387. data/spec/redmine/public/images/external.png +0 -0
  1388. data/spec/redmine/public/images/false.png +0 -0
  1389. data/spec/redmine/public/images/fav.png +0 -0
  1390. data/spec/redmine/public/images/fav_off.png +0 -0
  1391. data/spec/redmine/public/images/feed.png +0 -0
  1392. data/spec/redmine/public/images/files/c.png +0 -0
  1393. data/spec/redmine/public/images/files/csharp.png +0 -0
  1394. data/spec/redmine/public/images/files/css.png +0 -0
  1395. data/spec/redmine/public/images/files/default.png +0 -0
  1396. data/spec/redmine/public/images/files/html.png +0 -0
  1397. data/spec/redmine/public/images/files/image.png +0 -0
  1398. data/spec/redmine/public/images/files/java.png +0 -0
  1399. data/spec/redmine/public/images/files/js.png +0 -0
  1400. data/spec/redmine/public/images/files/pdf.png +0 -0
  1401. data/spec/redmine/public/images/files/php.png +0 -0
  1402. data/spec/redmine/public/images/files/ruby.png +0 -0
  1403. data/spec/redmine/public/images/files/text.png +0 -0
  1404. data/spec/redmine/public/images/files/xml.png +0 -0
  1405. data/spec/redmine/public/images/files/zip.png +0 -0
  1406. data/spec/redmine/public/images/folder.png +0 -0
  1407. data/spec/redmine/public/images/folder_open.png +0 -0
  1408. data/spec/redmine/public/images/folder_open_add.png +0 -0
  1409. data/spec/redmine/public/images/folder_open_orange.png +0 -0
  1410. data/spec/redmine/public/images/group.png +0 -0
  1411. data/spec/redmine/public/images/help.png +0 -0
  1412. data/spec/redmine/public/images/history.png +0 -0
  1413. data/spec/redmine/public/images/hourglass.png +0 -0
  1414. data/spec/redmine/public/images/jstoolbar/bt_bq.png +0 -0
  1415. data/spec/redmine/public/images/jstoolbar/bt_bq_remove.png +0 -0
  1416. data/spec/redmine/public/images/jstoolbar/bt_code.png +0 -0
  1417. data/spec/redmine/public/images/jstoolbar/bt_del.png +0 -0
  1418. data/spec/redmine/public/images/jstoolbar/bt_em.png +0 -0
  1419. data/spec/redmine/public/images/jstoolbar/bt_h1.png +0 -0
  1420. data/spec/redmine/public/images/jstoolbar/bt_h2.png +0 -0
  1421. data/spec/redmine/public/images/jstoolbar/bt_h3.png +0 -0
  1422. data/spec/redmine/public/images/jstoolbar/bt_img.png +0 -0
  1423. data/spec/redmine/public/images/jstoolbar/bt_ins.png +0 -0
  1424. data/spec/redmine/public/images/jstoolbar/bt_link.png +0 -0
  1425. data/spec/redmine/public/images/jstoolbar/bt_ol.png +0 -0
  1426. data/spec/redmine/public/images/jstoolbar/bt_pre.png +0 -0
  1427. data/spec/redmine/public/images/jstoolbar/bt_strong.png +0 -0
  1428. data/spec/redmine/public/images/jstoolbar/bt_ul.png +0 -0
  1429. data/spec/redmine/public/images/lightning.png +0 -0
  1430. data/spec/redmine/public/images/link.png +0 -0
  1431. data/spec/redmine/public/images/link_break.png +0 -0
  1432. data/spec/redmine/public/images/loading.gif +0 -0
  1433. data/spec/redmine/public/images/locked.png +0 -0
  1434. data/spec/redmine/public/images/magnifier.png +0 -0
  1435. data/spec/redmine/public/images/message.png +0 -0
  1436. data/spec/redmine/public/images/milestone_done.png +0 -0
  1437. data/spec/redmine/public/images/milestone_late.png +0 -0
  1438. data/spec/redmine/public/images/milestone_todo.png +0 -0
  1439. data/spec/redmine/public/images/move.png +0 -0
  1440. data/spec/redmine/public/images/news.png +0 -0
  1441. data/spec/redmine/public/images/openid-bg.gif +0 -0
  1442. data/spec/redmine/public/images/package.png +0 -0
  1443. data/spec/redmine/public/images/plugin.png +0 -0
  1444. data/spec/redmine/public/images/project_marker.png +0 -0
  1445. data/spec/redmine/public/images/projects.png +0 -0
  1446. data/spec/redmine/public/images/reload.png +0 -0
  1447. data/spec/redmine/public/images/report.png +0 -0
  1448. data/spec/redmine/public/images/save.png +0 -0
  1449. data/spec/redmine/public/images/server_key.png +0 -0
  1450. data/spec/redmine/public/images/sort_asc.png +0 -0
  1451. data/spec/redmine/public/images/sort_desc.png +0 -0
  1452. data/spec/redmine/public/images/stats.png +0 -0
  1453. data/spec/redmine/public/images/table_multiple.png +0 -0
  1454. data/spec/redmine/public/images/task_done.png +0 -0
  1455. data/spec/redmine/public/images/task_late.png +0 -0
  1456. data/spec/redmine/public/images/task_parent_end.png +0 -0
  1457. data/spec/redmine/public/images/task_todo.png +0 -0
  1458. data/spec/redmine/public/images/text_list_bullets.png +0 -0
  1459. data/spec/redmine/public/images/textfield.png +0 -0
  1460. data/spec/redmine/public/images/textfield_key.png +0 -0
  1461. data/spec/redmine/public/images/ticket.png +0 -0
  1462. data/spec/redmine/public/images/ticket_checked.png +0 -0
  1463. data/spec/redmine/public/images/ticket_edit.png +0 -0
  1464. data/spec/redmine/public/images/ticket_go.png +0 -0
  1465. data/spec/redmine/public/images/ticket_note.png +0 -0
  1466. data/spec/redmine/public/images/time.png +0 -0
  1467. data/spec/redmine/public/images/time_add.png +0 -0
  1468. data/spec/redmine/public/images/toggle_check.png +0 -0
  1469. data/spec/redmine/public/images/true.png +0 -0
  1470. data/spec/redmine/public/images/unlock.png +0 -0
  1471. data/spec/redmine/public/images/user.png +0 -0
  1472. data/spec/redmine/public/images/version_marker.png +0 -0
  1473. data/spec/redmine/public/images/warning.png +0 -0
  1474. data/spec/redmine/public/images/wiki_edit.png +0 -0
  1475. data/spec/redmine/public/images/zoom_in.png +0 -0
  1476. data/spec/redmine/public/images/zoom_out.png +0 -0
  1477. data/spec/redmine/public/javascripts/application.js +0 -656
  1478. data/spec/redmine/public/javascripts/attachments.js +0 -191
  1479. data/spec/redmine/public/javascripts/context_menu.js +0 -239
  1480. data/spec/redmine/public/javascripts/gantt.js +0 -175
  1481. data/spec/redmine/public/javascripts/i18n/datepicker-ar.js +0 -37
  1482. data/spec/redmine/public/javascripts/i18n/datepicker-az.js +0 -37
  1483. data/spec/redmine/public/javascripts/i18n/datepicker-bg.js +0 -38
  1484. data/spec/redmine/public/javascripts/i18n/datepicker-bs.js +0 -37
  1485. data/spec/redmine/public/javascripts/i18n/datepicker-ca.js +0 -37
  1486. data/spec/redmine/public/javascripts/i18n/datepicker-cs.js +0 -37
  1487. data/spec/redmine/public/javascripts/i18n/datepicker-da.js +0 -37
  1488. data/spec/redmine/public/javascripts/i18n/datepicker-de.js +0 -37
  1489. data/spec/redmine/public/javascripts/i18n/datepicker-el.js +0 -37
  1490. data/spec/redmine/public/javascripts/i18n/datepicker-en-GB.js +0 -37
  1491. data/spec/redmine/public/javascripts/i18n/datepicker-es.js +0 -37
  1492. data/spec/redmine/public/javascripts/i18n/datepicker-et.js +0 -37
  1493. data/spec/redmine/public/javascripts/i18n/datepicker-eu.js +0 -36
  1494. data/spec/redmine/public/javascripts/i18n/datepicker-fa.js +0 -73
  1495. data/spec/redmine/public/javascripts/i18n/datepicker-fi.js +0 -37
  1496. data/spec/redmine/public/javascripts/i18n/datepicker-fr.js +0 -39
  1497. data/spec/redmine/public/javascripts/i18n/datepicker-gl.js +0 -37
  1498. data/spec/redmine/public/javascripts/i18n/datepicker-he.js +0 -37
  1499. data/spec/redmine/public/javascripts/i18n/datepicker-hr.js +0 -37
  1500. data/spec/redmine/public/javascripts/i18n/datepicker-hu.js +0 -36
  1501. data/spec/redmine/public/javascripts/i18n/datepicker-id.js +0 -37
  1502. data/spec/redmine/public/javascripts/i18n/datepicker-it.js +0 -37
  1503. data/spec/redmine/public/javascripts/i18n/datepicker-ja.js +0 -37
  1504. data/spec/redmine/public/javascripts/i18n/datepicker-ko.js +0 -37
  1505. data/spec/redmine/public/javascripts/i18n/datepicker-lt.js +0 -37
  1506. data/spec/redmine/public/javascripts/i18n/datepicker-lv.js +0 -37
  1507. data/spec/redmine/public/javascripts/i18n/datepicker-mk.js +0 -37
  1508. data/spec/redmine/public/javascripts/i18n/datepicker-nl.js +0 -37
  1509. data/spec/redmine/public/javascripts/i18n/datepicker-no.js +0 -37
  1510. data/spec/redmine/public/javascripts/i18n/datepicker-pl.js +0 -37
  1511. data/spec/redmine/public/javascripts/i18n/datepicker-pt-BR.js +0 -37
  1512. data/spec/redmine/public/javascripts/i18n/datepicker-pt.js +0 -36
  1513. data/spec/redmine/public/javascripts/i18n/datepicker-ro.js +0 -40
  1514. data/spec/redmine/public/javascripts/i18n/datepicker-ru.js +0 -37
  1515. data/spec/redmine/public/javascripts/i18n/datepicker-sk.js +0 -37
  1516. data/spec/redmine/public/javascripts/i18n/datepicker-sl.js +0 -38
  1517. data/spec/redmine/public/javascripts/i18n/datepicker-sq.js +0 -37
  1518. data/spec/redmine/public/javascripts/i18n/datepicker-sr.js +0 -37
  1519. data/spec/redmine/public/javascripts/i18n/datepicker-sv.js +0 -37
  1520. data/spec/redmine/public/javascripts/i18n/datepicker-th.js +0 -37
  1521. data/spec/redmine/public/javascripts/i18n/datepicker-tr.js +0 -37
  1522. data/spec/redmine/public/javascripts/i18n/datepicker-uk.js +0 -38
  1523. data/spec/redmine/public/javascripts/i18n/datepicker-vi.js +0 -37
  1524. data/spec/redmine/public/javascripts/i18n/datepicker-zh-CN.js +0 -37
  1525. data/spec/redmine/public/javascripts/i18n/datepicker-zh-TW.js +0 -37
  1526. data/spec/redmine/public/javascripts/jquery-1.11.1-ui-1.11.0-ujs-3.1.3.js +0 -21
  1527. data/spec/redmine/public/javascripts/jstoolbar/jstoolbar-textile.min.js +0 -2
  1528. data/spec/redmine/public/javascripts/jstoolbar/jstoolbar.js +0 -374
  1529. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-ar.js +0 -16
  1530. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-az.js +0 -16
  1531. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-bg.js +0 -16
  1532. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-bs.js +0 -14
  1533. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-ca.js +0 -16
  1534. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-cs.js +0 -16
  1535. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-da.js +0 -16
  1536. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-de.js +0 -16
  1537. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-en-gb.js +0 -16
  1538. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-en.js +0 -16
  1539. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-es-pa.js +0 -16
  1540. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-es.js +0 -16
  1541. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-et.js +0 -33
  1542. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-eu.js +0 -20
  1543. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-fa.js +0 -16
  1544. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-fi.js +0 -16
  1545. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-fr.js +0 -16
  1546. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-gl.js +0 -16
  1547. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-he.js +0 -16
  1548. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-hr.js +0 -16
  1549. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-hu.js +0 -16
  1550. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-id.js +0 -16
  1551. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-it.js +0 -19
  1552. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-ja.js +0 -16
  1553. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-ko.js +0 -16
  1554. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-lt.js +0 -16
  1555. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-lv.js +0 -17
  1556. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-mk.js +0 -17
  1557. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-mn.js +0 -16
  1558. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-nl.js +0 -16
  1559. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-no.js +0 -16
  1560. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-pl.js +0 -17
  1561. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-pt-br.js +0 -18
  1562. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-pt.js +0 -17
  1563. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-ro.js +0 -16
  1564. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-ru.js +0 -16
  1565. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-sk.js +0 -16
  1566. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-sl.js +0 -16
  1567. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-sq.js +0 -16
  1568. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-sr-yu.js +0 -16
  1569. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-sr.js +0 -16
  1570. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-sv.js +0 -16
  1571. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-th.js +0 -16
  1572. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-tr.js +0 -14
  1573. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-uk.js +0 -16
  1574. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-vi.js +0 -16
  1575. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-zh-tw.js +0 -16
  1576. data/spec/redmine/public/javascripts/jstoolbar/lang/jstoolbar-zh.js +0 -16
  1577. data/spec/redmine/public/javascripts/jstoolbar/markdown.js +0 -202
  1578. data/spec/redmine/public/javascripts/jstoolbar/textile.js +0 -211
  1579. data/spec/redmine/public/javascripts/project_identifier.js +0 -81
  1580. data/spec/redmine/public/javascripts/raphael.js +0 -10
  1581. data/spec/redmine/public/javascripts/repository_navigation.js +0 -36
  1582. data/spec/redmine/public/javascripts/revision_graph.js +0 -97
  1583. data/spec/redmine/public/plugin_assets/empty +0 -0
  1584. data/spec/redmine/public/stylesheets/application.css +0 -1225
  1585. data/spec/redmine/public/stylesheets/context_menu.css +0 -52
  1586. data/spec/redmine/public/stylesheets/context_menu_rtl.css +0 -9
  1587. data/spec/redmine/public/stylesheets/jquery/images/animated-overlay.gif +0 -0
  1588. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
  1589. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
  1590. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_flat_10_000000_40x100.png +0 -0
  1591. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_glass_100_eef5fd_1x400.png +0 -0
  1592. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
  1593. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
  1594. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_gloss-wave_35_759fcf_500x100.png +0 -0
  1595. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
  1596. data/spec/redmine/public/stylesheets/jquery/images/ui-bg_highlight-soft_75_759fcf_1x100.png +0 -0
  1597. data/spec/redmine/public/stylesheets/jquery/images/ui-icons_222222_256x240.png +0 -0
  1598. data/spec/redmine/public/stylesheets/jquery/images/ui-icons_759fcf_256x240.png +0 -0
  1599. data/spec/redmine/public/stylesheets/jquery/images/ui-icons_ffd27a_256x240.png +0 -0
  1600. data/spec/redmine/public/stylesheets/jquery/images/ui-icons_ffffff_256x240.png +0 -0
  1601. data/spec/redmine/public/stylesheets/jquery/jquery-ui-1.11.0.css +0 -7
  1602. data/spec/redmine/public/stylesheets/jstoolbar.css +0 -100
  1603. data/spec/redmine/public/stylesheets/rtl.css +0 -385
  1604. data/spec/redmine/public/stylesheets/scm.css +0 -107
  1605. data/spec/redmine/public/themes/README +0 -1
  1606. data/spec/redmine/public/themes/alternate/stylesheets/application.css +0 -70
  1607. data/spec/redmine/public/themes/classic/images/home.png +0 -0
  1608. data/spec/redmine/public/themes/classic/images/wrench.png +0 -0
  1609. data/spec/redmine/public/themes/classic/stylesheets/application.css +0 -41
  1610. data/spec/redmine/script/about +0 -2
  1611. data/spec/redmine/script/rails +0 -2
  1612. data/spec/redmine/test/coverage/html_formatter.rb +0 -70
  1613. data/spec/redmine/test/coverage/views/index.erb +0 -60
  1614. data/spec/redmine/test/coverage/views/source.erb +0 -41
  1615. data/spec/redmine/test/extra/redmine_pm/repository_git_test_pm.rb +0 -97
  1616. data/spec/redmine/test/extra/redmine_pm/repository_subversion_test_pm.rb +0 -309
  1617. data/spec/redmine/test/extra/redmine_pm/test_case.rb +0 -82
  1618. data/spec/redmine/test/fixtures/attachments.yml +0 -269
  1619. data/spec/redmine/test/fixtures/auth_sources.yml +0 -13
  1620. data/spec/redmine/test/fixtures/boards.yml +0 -28
  1621. data/spec/redmine/test/fixtures/changes.yml +0 -22
  1622. data/spec/redmine/test/fixtures/changesets.yml +0 -104
  1623. data/spec/redmine/test/fixtures/comments.yml +0 -17
  1624. data/spec/redmine/test/fixtures/configuration/default.yml +0 -8
  1625. data/spec/redmine/test/fixtures/configuration/empty.yml +0 -7
  1626. data/spec/redmine/test/fixtures/configuration/no_default.yml +0 -8
  1627. data/spec/redmine/test/fixtures/configuration/overrides.yml +0 -9
  1628. data/spec/redmine/test/fixtures/custom_fields.yml +0 -147
  1629. data/spec/redmine/test/fixtures/custom_fields_projects.yml +0 -4
  1630. data/spec/redmine/test/fixtures/custom_fields_trackers.yml +0 -31
  1631. data/spec/redmine/test/fixtures/custom_values.yml +0 -103
  1632. data/spec/redmine/test/fixtures/diffs/issue-12641-ja.diff +0 -25
  1633. data/spec/redmine/test/fixtures/diffs/issue-12641-ru.diff +0 -19
  1634. data/spec/redmine/test/fixtures/diffs/issue-13644-1.diff +0 -7
  1635. data/spec/redmine/test/fixtures/diffs/issue-13644-2.diff +0 -7
  1636. data/spec/redmine/test/fixtures/diffs/issue-13644-3.diff +0 -7
  1637. data/spec/redmine/test/fixtures/diffs/issue-13644-4.diff +0 -7
  1638. data/spec/redmine/test/fixtures/diffs/issue-13644-5.diff +0 -7
  1639. data/spec/redmine/test/fixtures/diffs/partials.diff +0 -46
  1640. data/spec/redmine/test/fixtures/diffs/subversion.diff +0 -79
  1641. data/spec/redmine/test/fixtures/documents.yml +0 -14
  1642. data/spec/redmine/test/fixtures/email_addresses.yml +0 -57
  1643. data/spec/redmine/test/fixtures/enabled_modules.yml +0 -105
  1644. data/spec/redmine/test/fixtures/encoding/iso-8859-1.txt +0 -1
  1645. data/spec/redmine/test/fixtures/enumerations.yml +0 -103
  1646. data/spec/redmine/test/fixtures/files/2006/07/060719210727_archive.zip +0 -0
  1647. data/spec/redmine/test/fixtures/files/2006/07/060719210727_changeset_iso8859-1.diff +0 -13
  1648. data/spec/redmine/test/fixtures/files/2006/07/060719210727_changeset_utf8.diff +0 -13
  1649. data/spec/redmine/test/fixtures/files/2006/07/060719210727_source.rb +0 -10
  1650. data/spec/redmine/test/fixtures/files/2010/11/101123161450_testfile_1.png +0 -0
  1651. data/spec/redmine/test/fixtures/files/2010/12/101223161450_testfile_2.png +0 -0
  1652. data/spec/redmine/test/fixtures/files/hg-export.diff +0 -13
  1653. data/spec/redmine/test/fixtures/files/iso8859-1.txt +0 -13
  1654. data/spec/redmine/test/fixtures/files/japanese-utf-8.txt +0 -1
  1655. data/spec/redmine/test/fixtures/files/testfile.txt +0 -2
  1656. data/spec/redmine/test/fixtures/groups_users.yml +0 -7
  1657. data/spec/redmine/test/fixtures/issue_categories.yml +0 -21
  1658. data/spec/redmine/test/fixtures/issue_relations.yml +0 -12
  1659. data/spec/redmine/test/fixtures/issue_statuses.yml +0 -31
  1660. data/spec/redmine/test/fixtures/issues.yml +0 -268
  1661. data/spec/redmine/test/fixtures/journal_details.yml +0 -43
  1662. data/spec/redmine/test/fixtures/journals.yml +0 -36
  1663. data/spec/redmine/test/fixtures/ldap/slapd.conf +0 -19
  1664. data/spec/redmine/test/fixtures/ldap/test-ldap.ldif +0 -82
  1665. data/spec/redmine/test/fixtures/mail_handler/apple_mail_with_attachment.eml +0 -240
  1666. data/spec/redmine/test/fixtures/mail_handler/body_ks_c_5601-1987.eml +0 -14
  1667. data/spec/redmine/test/fixtures/mail_handler/fullname_of_sender_as_utf8_encoded.eml +0 -5
  1668. data/spec/redmine/test/fixtures/mail_handler/gmail-iso8859-2.eml +0 -11
  1669. data/spec/redmine/test/fixtures/mail_handler/gmail_with_attachment_iso-8859-1.eml +0 -26
  1670. data/spec/redmine/test/fixtures/mail_handler/gmail_with_attachment_ja.eml +0 -20
  1671. data/spec/redmine/test/fixtures/mail_handler/issue_update_with_multiple_quoted_reply_above.eml +0 -48
  1672. data/spec/redmine/test/fixtures/mail_handler/issue_update_with_quoted_reply_above.eml +0 -48
  1673. data/spec/redmine/test/fixtures/mail_handler/japanese_keywords_iso_2022_jp.eml +0 -60
  1674. data/spec/redmine/test/fixtures/mail_handler/message_reply.eml +0 -15
  1675. data/spec/redmine/test/fixtures/mail_handler/message_reply_by_subject.eml +0 -13
  1676. data/spec/redmine/test/fixtures/mail_handler/multiple_text_parts.eml +0 -62
  1677. data/spec/redmine/test/fixtures/mail_handler/no_subject_header.eml +0 -10
  1678. data/spec/redmine/test/fixtures/mail_handler/outlook_2010_html_only.eml +0 -966
  1679. data/spec/redmine/test/fixtures/mail_handler/outlook_web_access_2010_html_only.eml +0 -65
  1680. data/spec/redmine/test/fixtures/mail_handler/quoted_printable_utf8.eml +0 -19
  1681. data/spec/redmine/test/fixtures/mail_handler/subject_as_iso-8859-1.eml +0 -11
  1682. data/spec/redmine/test/fixtures/mail_handler/subject_japanese_1.eml +0 -7
  1683. data/spec/redmine/test/fixtures/mail_handler/subject_japanese_2.eml +0 -7
  1684. data/spec/redmine/test/fixtures/mail_handler/thunderbird_with_attachment_iso-8859-1.eml +0 -34
  1685. data/spec/redmine/test/fixtures/mail_handler/thunderbird_with_attachment_ja.eml +0 -26
  1686. data/spec/redmine/test/fixtures/mail_handler/ticket_by_empty_user.eml +0 -17
  1687. data/spec/redmine/test/fixtures/mail_handler/ticket_by_unknown_user.eml +0 -18
  1688. data/spec/redmine/test/fixtures/mail_handler/ticket_from_emission_address.eml +0 -19
  1689. data/spec/redmine/test/fixtures/mail_handler/ticket_html_only.eml +0 -23
  1690. data/spec/redmine/test/fixtures/mail_handler/ticket_on_given_project.eml +0 -60
  1691. data/spec/redmine/test/fixtures/mail_handler/ticket_reply.eml +0 -74
  1692. data/spec/redmine/test/fixtures/mail_handler/ticket_reply_with_status.eml +0 -80
  1693. data/spec/redmine/test/fixtures/mail_handler/ticket_with_attachment.eml +0 -248
  1694. data/spec/redmine/test/fixtures/mail_handler/ticket_with_attributes.eml +0 -43
  1695. data/spec/redmine/test/fixtures/mail_handler/ticket_with_cc.eml +0 -40
  1696. data/spec/redmine/test/fixtures/mail_handler/ticket_with_custom_fields.eml +0 -42
  1697. data/spec/redmine/test/fixtures/mail_handler/ticket_with_duplicate_keyword.eml +0 -25
  1698. data/spec/redmine/test/fixtures/mail_handler/ticket_with_invalid_attributes.eml +0 -47
  1699. data/spec/redmine/test/fixtures/mail_handler/ticket_with_keyword_after_delimiter.eml +0 -27
  1700. data/spec/redmine/test/fixtures/mail_handler/ticket_with_localized_attributes.eml +0 -43
  1701. data/spec/redmine/test/fixtures/mail_handler/ticket_with_long_subject.eml +0 -57
  1702. data/spec/redmine/test/fixtures/mail_handler/ticket_with_spaces_between_attribute_and_separator.eml +0 -43
  1703. data/spec/redmine/test/fixtures/mail_handler/ticket_without_from_header.eml +0 -40
  1704. data/spec/redmine/test/fixtures/member_roles.yml +0 -53
  1705. data/spec/redmine/test/fixtures/members.yml +0 -62
  1706. data/spec/redmine/test/fixtures/messages.yml +0 -79
  1707. data/spec/redmine/test/fixtures/news.yml +0 -31
  1708. data/spec/redmine/test/fixtures/plugins/foo_plugin/_foo_plugin_settings.html.erb +0 -1
  1709. data/spec/redmine/test/fixtures/projects.yml +0 -73
  1710. data/spec/redmine/test/fixtures/projects_trackers.yml +0 -46
  1711. data/spec/redmine/test/fixtures/queries.yml +0 -165
  1712. data/spec/redmine/test/fixtures/repositories.yml +0 -21
  1713. data/spec/redmine/test/fixtures/repositories/bazaar_repository.tar.gz +0 -0
  1714. data/spec/redmine/test/fixtures/repositories/cvs_repository.tar.gz +0 -0
  1715. data/spec/redmine/test/fixtures/repositories/darcs_repository.tar.gz +0 -0
  1716. data/spec/redmine/test/fixtures/repositories/filesystem_repository.tar.gz +0 -0
  1717. data/spec/redmine/test/fixtures/repositories/git_repository.tar.gz +0 -0
  1718. data/spec/redmine/test/fixtures/repositories/mercurial_repository.hg +0 -0
  1719. data/spec/redmine/test/fixtures/repositories/subversion_repository.dump.gz +0 -0
  1720. data/spec/redmine/test/fixtures/roles.yml +0 -206
  1721. data/spec/redmine/test/fixtures/time_entries.yml +0 -72
  1722. data/spec/redmine/test/fixtures/tokens.yml +0 -13
  1723. data/spec/redmine/test/fixtures/trackers.yml +0 -19
  1724. data/spec/redmine/test/fixtures/user_preferences.yml +0 -31
  1725. data/spec/redmine/test/fixtures/users.yml +0 -171
  1726. data/spec/redmine/test/fixtures/versions.yml +0 -71
  1727. data/spec/redmine/test/fixtures/watchers.yml +0 -13
  1728. data/spec/redmine/test/fixtures/wiki_content_versions.yml +0 -116
  1729. data/spec/redmine/test/fixtures/wiki_contents.yml +0 -136
  1730. data/spec/redmine/test/fixtures/wiki_pages.yml +0 -85
  1731. data/spec/redmine/test/fixtures/wikis.yml +0 -11
  1732. data/spec/redmine/test/fixtures/workflows.yml +0 -1884
  1733. data/spec/redmine/test/functional/account_controller_openid_test.rb +0 -175
  1734. data/spec/redmine/test/functional/account_controller_test.rb +0 -424
  1735. data/spec/redmine/test/functional/activities_controller_test.rb +0 -160
  1736. data/spec/redmine/test/functional/admin_controller_test.rb +0 -168
  1737. data/spec/redmine/test/functional/attachments_controller_test.rb +0 -467
  1738. data/spec/redmine/test/functional/auth_sources_controller_test.rb +0 -173
  1739. data/spec/redmine/test/functional/auto_completes_controller_test.rb +0 -90
  1740. data/spec/redmine/test/functional/boards_controller_test.rb +0 -221
  1741. data/spec/redmine/test/functional/calendars_controller_test.rb +0 -90
  1742. data/spec/redmine/test/functional/comments_controller_test.rb +0 -64
  1743. data/spec/redmine/test/functional/context_menus_controller_test.rb +0 -300
  1744. data/spec/redmine/test/functional/custom_fields_controller_test.rb +0 -238
  1745. data/spec/redmine/test/functional/documents_controller_test.rb +0 -185
  1746. data/spec/redmine/test/functional/email_addresses_controller_test.rb +0 -144
  1747. data/spec/redmine/test/functional/enumerations_controller_test.rb +0 -136
  1748. data/spec/redmine/test/functional/files_controller_test.rb +0 -120
  1749. data/spec/redmine/test/functional/gantts_controller_test.rb +0 -134
  1750. data/spec/redmine/test/functional/groups_controller_test.rb +0 -164
  1751. data/spec/redmine/test/functional/issue_categories_controller_test.rb +0 -145
  1752. data/spec/redmine/test/functional/issue_relations_controller_test.rb +0 -160
  1753. data/spec/redmine/test/functional/issue_statuses_controller_test.rb +0 -136
  1754. data/spec/redmine/test/functional/issues_controller_test.rb +0 -4273
  1755. data/spec/redmine/test/functional/issues_controller_transaction_test.rb +0 -261
  1756. data/spec/redmine/test/functional/issues_custom_fields_visibility_test.rb +0 -322
  1757. data/spec/redmine/test/functional/journals_controller_test.rb +0 -181
  1758. data/spec/redmine/test/functional/mail_handler_controller_test.rb +0 -96
  1759. data/spec/redmine/test/functional/members_controller_test.rb +0 -201
  1760. data/spec/redmine/test/functional/messages_controller_test.rb +0 -219
  1761. data/spec/redmine/test/functional/my_controller_test.rb +0 -280
  1762. data/spec/redmine/test/functional/news_controller_test.rb +0 -178
  1763. data/spec/redmine/test/functional/previews_controller_test.rb +0 -95
  1764. data/spec/redmine/test/functional/principal_memberships_controller_test.rb +0 -209
  1765. data/spec/redmine/test/functional/project_enumerations_controller_test.rb +0 -235
  1766. data/spec/redmine/test/functional/projects_controller_test.rb +0 -684
  1767. data/spec/redmine/test/functional/queries_controller_test.rb +0 -358
  1768. data/spec/redmine/test/functional/reports_controller_test.rb +0 -85
  1769. data/spec/redmine/test/functional/repositories_bazaar_controller_test.rb +0 -233
  1770. data/spec/redmine/test/functional/repositories_controller_test.rb +0 -307
  1771. data/spec/redmine/test/functional/repositories_cvs_controller_test.rb +0 -261
  1772. data/spec/redmine/test/functional/repositories_darcs_controller_test.rb +0 -161
  1773. data/spec/redmine/test/functional/repositories_filesystem_controller_test.rb +0 -150
  1774. data/spec/redmine/test/functional/repositories_git_controller_test.rb +0 -606
  1775. data/spec/redmine/test/functional/repositories_mercurial_controller_test.rb +0 -490
  1776. data/spec/redmine/test/functional/repositories_subversion_controller_test.rb +0 -421
  1777. data/spec/redmine/test/functional/roles_controller_test.rb +0 -208
  1778. data/spec/redmine/test/functional/search_controller_test.rb +0 -332
  1779. data/spec/redmine/test/functional/search_custom_fields_visibility_test.rb +0 -78
  1780. data/spec/redmine/test/functional/sessions_test.rb +0 -132
  1781. data/spec/redmine/test/functional/settings_controller_test.rb +0 -192
  1782. data/spec/redmine/test/functional/sys_controller_test.rb +0 -128
  1783. data/spec/redmine/test/functional/time_entry_reports_controller_test.rb +0 -354
  1784. data/spec/redmine/test/functional/timelog_controller_test.rb +0 -809
  1785. data/spec/redmine/test/functional/timelog_custom_fields_visibility_test.rb +0 -118
  1786. data/spec/redmine/test/functional/trackers_controller_test.rb +0 -205
  1787. data/spec/redmine/test/functional/users_controller_test.rb +0 -452
  1788. data/spec/redmine/test/functional/versions_controller_test.rb +0 -238
  1789. data/spec/redmine/test/functional/watchers_controller_test.rb +0 -271
  1790. data/spec/redmine/test/functional/welcome_controller_test.rb +0 -177
  1791. data/spec/redmine/test/functional/wiki_controller_test.rb +0 -961
  1792. data/spec/redmine/test/functional/wikis_controller_test.rb +0 -84
  1793. data/spec/redmine/test/functional/workflows_controller_test.rb +0 -369
  1794. data/spec/redmine/test/integration/account_test.rb +0 -326
  1795. data/spec/redmine/test/integration/admin_test.rb +0 -61
  1796. data/spec/redmine/test/integration/api_test/api_routing_test.rb +0 -158
  1797. data/spec/redmine/test/integration/api_test/api_test.rb +0 -47
  1798. data/spec/redmine/test/integration/api_test/attachments_test.rb +0 -156
  1799. data/spec/redmine/test/integration/api_test/authentication_test.rb +0 -158
  1800. data/spec/redmine/test/integration/api_test/custom_fields_attribute_test.rb +0 -63
  1801. data/spec/redmine/test/integration/api_test/custom_fields_test.rb +0 -41
  1802. data/spec/redmine/test/integration/api_test/disabled_rest_api_test.rb +0 -78
  1803. data/spec/redmine/test/integration/api_test/enumerations_test.rb +0 -40
  1804. data/spec/redmine/test/integration/api_test/groups_test.rb +0 -209
  1805. data/spec/redmine/test/integration/api_test/issue_categories_test.rb +0 -104
  1806. data/spec/redmine/test/integration/api_test/issue_relations_test.rb +0 -80
  1807. data/spec/redmine/test/integration/api_test/issue_statuses_test.rb +0 -32
  1808. data/spec/redmine/test/integration/api_test/issues_test.rb +0 -704
  1809. data/spec/redmine/test/integration/api_test/jsonp_test.rb +0 -72
  1810. data/spec/redmine/test/integration/api_test/memberships_test.rb +0 -158
  1811. data/spec/redmine/test/integration/api_test/news_test.rb +0 -61
  1812. data/spec/redmine/test/integration/api_test/projects_test.rb +0 -234
  1813. data/spec/redmine/test/integration/api_test/queries_test.rb +0 -39
  1814. data/spec/redmine/test/integration/api_test/roles_test.rb +0 -62
  1815. data/spec/redmine/test/integration/api_test/time_entries_test.rb +0 -135
  1816. data/spec/redmine/test/integration/api_test/trackers_test.rb +0 -33
  1817. data/spec/redmine/test/integration/api_test/users_test.rb +0 -294
  1818. data/spec/redmine/test/integration/api_test/versions_test.rb +0 -129
  1819. data/spec/redmine/test/integration/api_test/wiki_pages_test.rb +0 -190
  1820. data/spec/redmine/test/integration/application_test.rb +0 -97
  1821. data/spec/redmine/test/integration/attachments_test.rb +0 -152
  1822. data/spec/redmine/test/integration/feeds_test.rb +0 -31
  1823. data/spec/redmine/test/integration/issues_test.rb +0 -216
  1824. data/spec/redmine/test/integration/layout_test.rb +0 -127
  1825. data/spec/redmine/test/integration/lib/redmine/hook_test.rb +0 -124
  1826. data/spec/redmine/test/integration/lib/redmine/menu_manager_test.rb +0 -66
  1827. data/spec/redmine/test/integration/lib/redmine/themes_test.rb +0 -100
  1828. data/spec/redmine/test/integration/projects_test.rb +0 -51
  1829. data/spec/redmine/test/integration/repositories_git_test.rb +0 -50
  1830. data/spec/redmine/test/integration/routing/account_test.rb +0 -36
  1831. data/spec/redmine/test/integration/routing/activities_test.rb +0 -31
  1832. data/spec/redmine/test/integration/routing/admin_test.rb +0 -29
  1833. data/spec/redmine/test/integration/routing/attachments_test.rb +0 -36
  1834. data/spec/redmine/test/integration/routing/auth_sources_test.rb +0 -32
  1835. data/spec/redmine/test/integration/routing/auto_completes_test.rb +0 -24
  1836. data/spec/redmine/test/integration/routing/boards_test.rb +0 -32
  1837. data/spec/redmine/test/integration/routing/calendars_test.rb +0 -25
  1838. data/spec/redmine/test/integration/routing/comments_test.rb +0 -25
  1839. data/spec/redmine/test/integration/routing/context_menus_test.rb +0 -30
  1840. data/spec/redmine/test/integration/routing/custom_fields_test.rb +0 -30
  1841. data/spec/redmine/test/integration/routing/documents_test.rb +0 -37
  1842. data/spec/redmine/test/integration/routing/enumerations_test.rb +0 -30
  1843. data/spec/redmine/test/integration/routing/files_test.rb +0 -26
  1844. data/spec/redmine/test/integration/routing/gantts_test.rb +0 -28
  1845. data/spec/redmine/test/integration/routing/groups_test.rb +0 -40
  1846. data/spec/redmine/test/integration/routing/issue_categories_test.rb +0 -32
  1847. data/spec/redmine/test/integration/routing/issue_relations_test.rb +0 -27
  1848. data/spec/redmine/test/integration/routing/issue_statuses_test.rb +0 -32
  1849. data/spec/redmine/test/integration/routing/issues_test.rb +0 -60
  1850. data/spec/redmine/test/integration/routing/journals_test.rb +0 -29
  1851. data/spec/redmine/test/integration/routing/mail_handler_test.rb +0 -25
  1852. data/spec/redmine/test/integration/routing/members_test.rb +0 -31
  1853. data/spec/redmine/test/integration/routing/messages_test.rb +0 -33
  1854. data/spec/redmine/test/integration/routing/my_test.rb +0 -43
  1855. data/spec/redmine/test/integration/routing/news_test.rb +0 -36
  1856. data/spec/redmine/test/integration/routing/previews_test.rb +0 -32
  1857. data/spec/redmine/test/integration/routing/principal_memberships_test.rb +0 -34
  1858. data/spec/redmine/test/integration/routing/project_enumerations_test.rb +0 -25
  1859. data/spec/redmine/test/integration/routing/projects_test.rb +0 -39
  1860. data/spec/redmine/test/integration/routing/queries_test.rb +0 -34
  1861. data/spec/redmine/test/integration/routing/reports_test.rb +0 -25
  1862. data/spec/redmine/test/integration/routing/repositories_test.rb +0 -139
  1863. data/spec/redmine/test/integration/routing/roles_test.rb +0 -33
  1864. data/spec/redmine/test/integration/routing/search_test.rb +0 -25
  1865. data/spec/redmine/test/integration/routing/settings_test.rb +0 -29
  1866. data/spec/redmine/test/integration/routing/sys_test.rb +0 -27
  1867. data/spec/redmine/test/integration/routing/timelog_test.rb +0 -66
  1868. data/spec/redmine/test/integration/routing/trackers_test.rb +0 -33
  1869. data/spec/redmine/test/integration/routing/users_test.rb +0 -32
  1870. data/spec/redmine/test/integration/routing/versions_test.rb +0 -36
  1871. data/spec/redmine/test/integration/routing/watchers_test.rb +0 -31
  1872. data/spec/redmine/test/integration/routing/welcome_test.rb +0 -25
  1873. data/spec/redmine/test/integration/routing/wiki_test.rb +0 -59
  1874. data/spec/redmine/test/integration/routing/wikis_test.rb +0 -27
  1875. data/spec/redmine/test/integration/routing/workflows_test.rb +0 -32
  1876. data/spec/redmine/test/integration/sudo_mode_test.rb +0 -164
  1877. data/spec/redmine/test/integration/users_test.rb +0 -29
  1878. data/spec/redmine/test/mocks/open_id_authentication_mock.rb +0 -46
  1879. data/spec/redmine/test/object_helpers.rb +0 -242
  1880. data/spec/redmine/test/test_helper.rb +0 -355
  1881. data/spec/redmine/test/travis/mariadb.pref +0 -6
  1882. data/spec/redmine/test/ui/base.rb +0 -69
  1883. data/spec/redmine/test/ui/issues_test_ui.rb +0 -278
  1884. data/spec/redmine/test/ui/sudo_mode_test_ui.rb +0 -53
  1885. data/spec/redmine/test/ui/timelog_test_ui.rb +0 -44
  1886. data/spec/redmine/test/unit/activity_test.rb +0 -197
  1887. data/spec/redmine/test/unit/attachment_test.rb +0 -360
  1888. data/spec/redmine/test/unit/auth_source_ldap_test.rb +0 -141
  1889. data/spec/redmine/test/unit/board_test.rb +0 -125
  1890. data/spec/redmine/test/unit/changeset_test.rb +0 -578
  1891. data/spec/redmine/test/unit/comment_test.rb +0 -57
  1892. data/spec/redmine/test/unit/custom_field_test.rb +0 -335
  1893. data/spec/redmine/test/unit/custom_field_user_format_test.rb +0 -78
  1894. data/spec/redmine/test/unit/custom_field_version_format_test.rb +0 -60
  1895. data/spec/redmine/test/unit/custom_value_test.rb +0 -39
  1896. data/spec/redmine/test/unit/default_data_test.rb +0 -49
  1897. data/spec/redmine/test/unit/document_category_test.rb +0 -47
  1898. data/spec/redmine/test/unit/document_test.rb +0 -69
  1899. data/spec/redmine/test/unit/enabled_module_test.rb +0 -43
  1900. data/spec/redmine/test/unit/enumeration_test.rb +0 -130
  1901. data/spec/redmine/test/unit/group_test.rb +0 -169
  1902. data/spec/redmine/test/unit/helpers/activities_helper_test.rb +0 -102
  1903. data/spec/redmine/test/unit/helpers/application_helper_test.rb +0 -1528
  1904. data/spec/redmine/test/unit/helpers/custom_fields_helper_test.rb +0 -60
  1905. data/spec/redmine/test/unit/helpers/groups_helper_test.rb +0 -42
  1906. data/spec/redmine/test/unit/helpers/issues_helper_test.rb +0 -339
  1907. data/spec/redmine/test/unit/helpers/members_helper_test.rb +0 -43
  1908. data/spec/redmine/test/unit/helpers/my_helper_test.rb +0 -50
  1909. data/spec/redmine/test/unit/helpers/projects_helper_test.rb +0 -85
  1910. data/spec/redmine/test/unit/helpers/queries_helper_test.rb +0 -97
  1911. data/spec/redmine/test/unit/helpers/routes_helper_test.rb +0 -47
  1912. data/spec/redmine/test/unit/helpers/search_helper_test.rb +0 -49
  1913. data/spec/redmine/test/unit/helpers/settings_helper_test.rb +0 -31
  1914. data/spec/redmine/test/unit/helpers/sort_helper_test.rb +0 -109
  1915. data/spec/redmine/test/unit/helpers/timelog_helper_test.rb +0 -58
  1916. data/spec/redmine/test/unit/helpers/version_helper_test.rb +0 -53
  1917. data/spec/redmine/test/unit/helpers/watchers_helper_test.rb +0 -74
  1918. data/spec/redmine/test/unit/initializers/patches_test.rb +0 -95
  1919. data/spec/redmine/test/unit/issue_category_test.rb +0 -54
  1920. data/spec/redmine/test/unit/issue_custom_field_test.rb +0 -42
  1921. data/spec/redmine/test/unit/issue_nested_set_concurrency_test.rb +0 -96
  1922. data/spec/redmine/test/unit/issue_nested_set_test.rb +0 -309
  1923. data/spec/redmine/test/unit/issue_priority_test.rb +0 -106
  1924. data/spec/redmine/test/unit/issue_relation_test.rb +0 -236
  1925. data/spec/redmine/test/unit/issue_scopes_test.rb +0 -69
  1926. data/spec/redmine/test/unit/issue_status_test.rb +0 -141
  1927. data/spec/redmine/test/unit/issue_subtasking_test.rb +0 -260
  1928. data/spec/redmine/test/unit/issue_test.rb +0 -2704
  1929. data/spec/redmine/test/unit/issue_transaction_test.rb +0 -52
  1930. data/spec/redmine/test/unit/journal_observer_test.rb +0 -174
  1931. data/spec/redmine/test/unit/journal_test.rb +0 -223
  1932. data/spec/redmine/test/unit/lib/redmine/access_control_test.rb +0 -59
  1933. data/spec/redmine/test/unit/lib/redmine/ciphering_test.rb +0 -106
  1934. data/spec/redmine/test/unit/lib/redmine/codeset_util_test.rb +0 -88
  1935. data/spec/redmine/test/unit/lib/redmine/configuration_test.rb +0 -61
  1936. data/spec/redmine/test/unit/lib/redmine/export/csv_test.rb +0 -31
  1937. data/spec/redmine/test/unit/lib/redmine/export/pdf_test.rb +0 -104
  1938. data/spec/redmine/test/unit/lib/redmine/field_format/bool_format_test.rb +0 -63
  1939. data/spec/redmine/test/unit/lib/redmine/field_format/field_format_test.rb +0 -62
  1940. data/spec/redmine/test/unit/lib/redmine/field_format/link_format_test.rb +0 -90
  1941. data/spec/redmine/test/unit/lib/redmine/field_format/list_format_test.rb +0 -168
  1942. data/spec/redmine/test/unit/lib/redmine/field_format/numeric_format_test.rb +0 -31
  1943. data/spec/redmine/test/unit/lib/redmine/field_format/user_field_format_test.rb +0 -61
  1944. data/spec/redmine/test/unit/lib/redmine/field_format/version_field_format_test.rb +0 -69
  1945. data/spec/redmine/test/unit/lib/redmine/helpers/calendar_test.rb +0 -63
  1946. data/spec/redmine/test/unit/lib/redmine/helpers/diff_test.rb +0 -25
  1947. data/spec/redmine/test/unit/lib/redmine/helpers/gantt_test.rb +0 -498
  1948. data/spec/redmine/test/unit/lib/redmine/hook_test.rb +0 -189
  1949. data/spec/redmine/test/unit/lib/redmine/i18n_test.rb +0 -244
  1950. data/spec/redmine/test/unit/lib/redmine/info_test.rb +0 -27
  1951. data/spec/redmine/test/unit/lib/redmine/menu_manager/mapper_test.rb +0 -191
  1952. data/spec/redmine/test/unit/lib/redmine/menu_manager/menu_helper_test.rb +0 -260
  1953. data/spec/redmine/test/unit/lib/redmine/menu_manager/menu_item_test.rb +0 -108
  1954. data/spec/redmine/test/unit/lib/redmine/menu_manager_test.rb +0 -34
  1955. data/spec/redmine/test/unit/lib/redmine/mime_type_test.rb +0 -66
  1956. data/spec/redmine/test/unit/lib/redmine/notifiable_test.rb +0 -29
  1957. data/spec/redmine/test/unit/lib/redmine/pagination_helper_test.rb +0 -34
  1958. data/spec/redmine/test/unit/lib/redmine/pagination_test.rb +0 -94
  1959. data/spec/redmine/test/unit/lib/redmine/plugin_test.rb +0 -186
  1960. data/spec/redmine/test/unit/lib/redmine/safe_attributes_test.rb +0 -102
  1961. data/spec/redmine/test/unit/lib/redmine/scm/adapters/bazaar_adapter_test.rb +0 -218
  1962. data/spec/redmine/test/unit/lib/redmine/scm/adapters/cvs_adapter_test.rb +0 -106
  1963. data/spec/redmine/test/unit/lib/redmine/scm/adapters/darcs_adapter_test.rb +0 -60
  1964. data/spec/redmine/test/unit/lib/redmine/scm/adapters/filesystem_adapter_test.rb +0 -68
  1965. data/spec/redmine/test/unit/lib/redmine/scm/adapters/git_adapter_test.rb +0 -597
  1966. data/spec/redmine/test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb +0 -462
  1967. data/spec/redmine/test/unit/lib/redmine/scm/adapters/subversion_adapter_test.rb +0 -63
  1968. data/spec/redmine/test/unit/lib/redmine/themes_test.rb +0 -61
  1969. data/spec/redmine/test/unit/lib/redmine/unified_diff_test.rb +0 -352
  1970. data/spec/redmine/test/unit/lib/redmine/utils/date_calculation.rb +0 -76
  1971. data/spec/redmine/test/unit/lib/redmine/views/builders/json_test.rb +0 -94
  1972. data/spec/redmine/test/unit/lib/redmine/views/builders/xml_test.rb +0 -67
  1973. data/spec/redmine/test/unit/lib/redmine/views/labelled_form_builder_test.rb +0 -29
  1974. data/spec/redmine/test/unit/lib/redmine/wiki_formatting/html_parser_test.rb +0 -35
  1975. data/spec/redmine/test/unit/lib/redmine/wiki_formatting/macros_test.rb +0 -401
  1976. data/spec/redmine/test/unit/lib/redmine/wiki_formatting/markdown_formatter_test.rb +0 -80
  1977. data/spec/redmine/test/unit/lib/redmine/wiki_formatting/markdown_html_parser_test.rb +0 -30
  1978. data/spec/redmine/test/unit/lib/redmine/wiki_formatting/textile_formatter_test.rb +0 -512
  1979. data/spec/redmine/test/unit/lib/redmine/wiki_formatting/textile_html_parser_test.rb +0 -30
  1980. data/spec/redmine/test/unit/lib/redmine/wiki_formatting_test.rb +0 -83
  1981. data/spec/redmine/test/unit/lib/redmine_test.rb +0 -86
  1982. data/spec/redmine/test/unit/mail_handler_test.rb +0 -997
  1983. data/spec/redmine/test/unit/mailer_test.rb +0 -853
  1984. data/spec/redmine/test/unit/member_test.rb +0 -193
  1985. data/spec/redmine/test/unit/message_test.rb +0 -184
  1986. data/spec/redmine/test/unit/news_test.rb +0 -90
  1987. data/spec/redmine/test/unit/principal_test.rb +0 -136
  1988. data/spec/redmine/test/unit/project_copy_test.rb +0 -353
  1989. data/spec/redmine/test/unit/project_members_inheritance_test.rb +0 -264
  1990. data/spec/redmine/test/unit/project_nested_set_concurrency_test.rb +0 -76
  1991. data/spec/redmine/test/unit/project_nested_set_test.rb +0 -187
  1992. data/spec/redmine/test/unit/project_test.rb +0 -975
  1993. data/spec/redmine/test/unit/query_test.rb +0 -1514
  1994. data/spec/redmine/test/unit/repository_bazaar_test.rb +0 -297
  1995. data/spec/redmine/test/unit/repository_cvs_test.rb +0 -271
  1996. data/spec/redmine/test/unit/repository_darcs_test.rb +0 -129
  1997. data/spec/redmine/test/unit/repository_filesystem_test.rb +0 -88
  1998. data/spec/redmine/test/unit/repository_git_test.rb +0 -623
  1999. data/spec/redmine/test/unit/repository_mercurial_test.rb +0 -644
  2000. data/spec/redmine/test/unit/repository_subversion_test.rb +0 -285
  2001. data/spec/redmine/test/unit/repository_test.rb +0 -499
  2002. data/spec/redmine/test/unit/role_test.rb +0 -141
  2003. data/spec/redmine/test/unit/search_test.rb +0 -199
  2004. data/spec/redmine/test/unit/setting_test.rb +0 -127
  2005. data/spec/redmine/test/unit/time_entry_activity_test.rb +0 -130
  2006. data/spec/redmine/test/unit/time_entry_query_test.rb +0 -47
  2007. data/spec/redmine/test/unit/time_entry_test.rb +0 -175
  2008. data/spec/redmine/test/unit/token_test.rb +0 -108
  2009. data/spec/redmine/test/unit/tracker_test.rb +0 -118
  2010. data/spec/redmine/test/unit/user_preference_test.rb +0 -77
  2011. data/spec/redmine/test/unit/user_test.rb +0 -1228
  2012. data/spec/redmine/test/unit/version_test.rb +0 -272
  2013. data/spec/redmine/test/unit/watcher_test.rb +0 -192
  2014. data/spec/redmine/test/unit/wiki_content_test.rb +0 -166
  2015. data/spec/redmine/test/unit/wiki_content_version_test.rb +0 -68
  2016. data/spec/redmine/test/unit/wiki_page_test.rb +0 -183
  2017. data/spec/redmine/test/unit/wiki_redirect_test.rb +0 -97
  2018. data/spec/redmine/test/unit/wiki_test.rb +0 -114
  2019. data/spec/redmine/test/unit/workflow_test.rb +0 -65
  2020. data/spec/redmine/test/unit/workflow_transition_test.rb +0 -93
  2021. data/spec/redmine/tmp/pdf/empty +0 -0
  2022. data/spec/redmine/tmp/test/empty +0 -0
  2023. data/spec/redmine/tmp/thumbnails/empty +0 -0
  2024. data/spec/support/easy_queries_helpers.rb +0 -0
@@ -1,145 +0,0 @@
1
- # Redmine - project management software
2
- # Copyright (C) 2006-2015 Jean-Philippe Lang
3
- #
4
- # This program is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU General Public License
6
- # as published by the Free Software Foundation; either version 2
7
- # of the License, or (at your option) any later version.
8
- #
9
- # This program is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- # GNU General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License
15
- # along with this program; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
-
18
- require File.expand_path('../../test_helper', __FILE__)
19
-
20
- class IssueCategoriesControllerTest < ActionController::TestCase
21
- fixtures :projects, :users, :members, :member_roles, :roles, :enabled_modules, :issue_categories,
22
- :issues
23
-
24
- def setup
25
- User.current = nil
26
- @request.session[:user_id] = 2
27
- end
28
-
29
- def test_new
30
- @request.session[:user_id] = 2 # manager
31
- get :new, :project_id => '1'
32
- assert_response :success
33
- assert_template 'new'
34
- assert_select 'input[name=?]', 'issue_category[name]'
35
- end
36
-
37
- def test_new_from_issue_form
38
- @request.session[:user_id] = 2 # manager
39
- xhr :get, :new, :project_id => '1'
40
-
41
- assert_response :success
42
- assert_template 'new'
43
- assert_equal 'text/javascript', response.content_type
44
- end
45
-
46
- def test_create
47
- @request.session[:user_id] = 2 # manager
48
- assert_difference 'IssueCategory.count' do
49
- post :create, :project_id => '1', :issue_category => {:name => 'New category'}
50
- end
51
- assert_redirected_to '/projects/ecookbook/settings/categories'
52
- category = IssueCategory.find_by_name('New category')
53
- assert_not_nil category
54
- assert_equal 1, category.project_id
55
- end
56
-
57
- def test_create_failure
58
- @request.session[:user_id] = 2
59
- post :create, :project_id => '1', :issue_category => {:name => ''}
60
- assert_response :success
61
- assert_template 'new'
62
- end
63
-
64
- def test_create_from_issue_form
65
- @request.session[:user_id] = 2 # manager
66
- assert_difference 'IssueCategory.count' do
67
- xhr :post, :create, :project_id => '1', :issue_category => {:name => 'New category'}
68
- end
69
- category = IssueCategory.order('id DESC').first
70
- assert_equal 'New category', category.name
71
-
72
- assert_response :success
73
- assert_template 'create'
74
- assert_equal 'text/javascript', response.content_type
75
- end
76
-
77
- def test_create_from_issue_form_with_failure
78
- @request.session[:user_id] = 2 # manager
79
- assert_no_difference 'IssueCategory.count' do
80
- xhr :post, :create, :project_id => '1', :issue_category => {:name => ''}
81
- end
82
-
83
- assert_response :success
84
- assert_template 'new'
85
- assert_equal 'text/javascript', response.content_type
86
- end
87
-
88
- def test_edit
89
- @request.session[:user_id] = 2
90
- get :edit, :id => 2
91
- assert_response :success
92
- assert_template 'edit'
93
- assert_select 'input[name=?][value=?]', 'issue_category[name]', 'Recipes'
94
- end
95
-
96
- def test_update
97
- assert_no_difference 'IssueCategory.count' do
98
- put :update, :id => 2, :issue_category => { :name => 'Testing' }
99
- end
100
- assert_redirected_to '/projects/ecookbook/settings/categories'
101
- assert_equal 'Testing', IssueCategory.find(2).name
102
- end
103
-
104
- def test_update_failure
105
- put :update, :id => 2, :issue_category => { :name => '' }
106
- assert_response :success
107
- assert_template 'edit'
108
- end
109
-
110
- def test_update_not_found
111
- put :update, :id => 97, :issue_category => { :name => 'Testing' }
112
- assert_response 404
113
- end
114
-
115
- def test_destroy_category_not_in_use
116
- delete :destroy, :id => 2
117
- assert_redirected_to '/projects/ecookbook/settings/categories'
118
- assert_nil IssueCategory.find_by_id(2)
119
- end
120
-
121
- def test_destroy_category_in_use
122
- delete :destroy, :id => 1
123
- assert_response :success
124
- assert_template 'destroy'
125
- assert_not_nil IssueCategory.find_by_id(1)
126
- end
127
-
128
- def test_destroy_category_in_use_with_reassignment
129
- issue = Issue.where(:category_id => 1).first
130
- delete :destroy, :id => 1, :todo => 'reassign', :reassign_to_id => 2
131
- assert_redirected_to '/projects/ecookbook/settings/categories'
132
- assert_nil IssueCategory.find_by_id(1)
133
- # check that the issue was reassign
134
- assert_equal 2, issue.reload.category_id
135
- end
136
-
137
- def test_destroy_category_in_use_without_reassignment
138
- issue = Issue.where(:category_id => 1).first
139
- delete :destroy, :id => 1, :todo => 'nullify'
140
- assert_redirected_to '/projects/ecookbook/settings/categories'
141
- assert_nil IssueCategory.find_by_id(1)
142
- # check that the issue category was nullified
143
- assert_nil issue.reload.category_id
144
- end
145
- end
@@ -1,160 +0,0 @@
1
- # Redmine - project management software
2
- # Copyright (C) 2006-2015 Jean-Philippe Lang
3
- #
4
- # This program is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU General Public License
6
- # as published by the Free Software Foundation; either version 2
7
- # of the License, or (at your option) any later version.
8
- #
9
- # This program is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- # GNU General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License
15
- # along with this program; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
-
18
- require File.expand_path('../../test_helper', __FILE__)
19
-
20
- class IssueRelationsControllerTest < ActionController::TestCase
21
- fixtures :projects,
22
- :users,
23
- :roles,
24
- :members,
25
- :member_roles,
26
- :issues,
27
- :issue_statuses,
28
- :issue_relations,
29
- :enabled_modules,
30
- :enumerations,
31
- :trackers,
32
- :projects_trackers
33
-
34
- def setup
35
- User.current = nil
36
- @request.session[:user_id] = 3
37
- end
38
-
39
- def test_create
40
- assert_difference 'IssueRelation.count' do
41
- post :create, :issue_id => 1,
42
- :relation => {:issue_to_id => '2', :relation_type => 'relates', :delay => ''}
43
- end
44
- relation = IssueRelation.order('id DESC').first
45
- assert_equal 1, relation.issue_from_id
46
- assert_equal 2, relation.issue_to_id
47
- assert_equal 'relates', relation.relation_type
48
- end
49
-
50
- def test_create_on_invalid_issue
51
- assert_no_difference 'IssueRelation.count' do
52
- post :create, :issue_id => 999,
53
- :relation => {:issue_to_id => '2', :relation_type => 'relates', :delay => ''}
54
- assert_response 404
55
- end
56
- end
57
-
58
- def test_create_xhr
59
- assert_difference 'IssueRelation.count' do
60
- xhr :post, :create, :issue_id => 3, :relation => {:issue_to_id => '1', :relation_type => 'relates', :delay => ''}
61
- assert_response :success
62
- assert_template 'create'
63
- assert_equal 'text/javascript', response.content_type
64
- end
65
- relation = IssueRelation.order('id DESC').first
66
- assert_equal 3, relation.issue_from_id
67
- assert_equal 1, relation.issue_to_id
68
-
69
- assert_match /Bug #1/, response.body
70
- end
71
-
72
- def test_create_should_accept_id_with_hash
73
- assert_difference 'IssueRelation.count' do
74
- post :create, :issue_id => 1,
75
- :relation => {:issue_to_id => '#2', :relation_type => 'relates', :delay => ''}
76
- end
77
- relation = IssueRelation.order('id DESC').first
78
- assert_equal 2, relation.issue_to_id
79
- end
80
-
81
- def test_create_should_strip_id
82
- assert_difference 'IssueRelation.count' do
83
- post :create, :issue_id => 1,
84
- :relation => {:issue_to_id => ' 2 ', :relation_type => 'relates', :delay => ''}
85
- end
86
- relation = IssueRelation.order('id DESC').first
87
- assert_equal 2, relation.issue_to_id
88
- end
89
-
90
- def test_create_should_not_break_with_non_numerical_id
91
- assert_no_difference 'IssueRelation.count' do
92
- assert_nothing_raised do
93
- post :create, :issue_id => 1,
94
- :relation => {:issue_to_id => 'foo', :relation_type => 'relates', :delay => ''}
95
- end
96
- end
97
- end
98
-
99
- def test_create_follows_relation_should_update_relations_list
100
- issue1 = Issue.generate!(:subject => 'Followed issue', :start_date => Date.yesterday, :due_date => Date.today)
101
- issue2 = Issue.generate!
102
-
103
- assert_difference 'IssueRelation.count' do
104
- xhr :post, :create, :issue_id => issue2.id,
105
- :relation => {:issue_to_id => issue1.id, :relation_type => 'follows', :delay => ''}
106
- end
107
- assert_match /Followed issue/, response.body
108
- end
109
-
110
- def test_should_create_relations_with_visible_issues_only
111
- Setting.cross_project_issue_relations = '1'
112
- assert_nil Issue.visible(User.find(3)).find_by_id(4)
113
-
114
- assert_no_difference 'IssueRelation.count' do
115
- post :create, :issue_id => 1,
116
- :relation => {:issue_to_id => '4', :relation_type => 'relates', :delay => ''}
117
- end
118
- end
119
-
120
- def test_create_xhr_with_failure
121
- assert_no_difference 'IssueRelation.count' do
122
- xhr :post, :create, :issue_id => 3, :relation => {:issue_to_id => '999', :relation_type => 'relates', :delay => ''}
123
-
124
- assert_response :success
125
- assert_template 'create'
126
- assert_equal 'text/javascript', response.content_type
127
- end
128
-
129
- assert_match /errorExplanation/, response.body
130
- end
131
-
132
- def test_destroy
133
- assert_difference 'IssueRelation.count', -1 do
134
- delete :destroy, :id => '2'
135
- end
136
- end
137
-
138
- def test_destroy_invalid_relation
139
- assert_no_difference 'IssueRelation.count' do
140
- delete :destroy, :id => '999'
141
- assert_response 404
142
- end
143
- end
144
-
145
- def test_destroy_xhr
146
- IssueRelation.create!(:relation_type => IssueRelation::TYPE_RELATES) do |r|
147
- r.issue_from_id = 3
148
- r.issue_to_id = 1
149
- end
150
-
151
- assert_difference 'IssueRelation.count', -1 do
152
- xhr :delete, :destroy, :id => '2'
153
-
154
- assert_response :success
155
- assert_template 'destroy'
156
- assert_equal 'text/javascript', response.content_type
157
- assert_match /relation-2/, response.body
158
- end
159
- end
160
- end
@@ -1,136 +0,0 @@
1
- # Redmine - project management software
2
- # Copyright (C) 2006-2015 Jean-Philippe Lang
3
- #
4
- # This program is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU General Public License
6
- # as published by the Free Software Foundation; either version 2
7
- # of the License, or (at your option) any later version.
8
- #
9
- # This program is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- # GNU General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License
15
- # along with this program; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
-
18
- require File.expand_path('../../test_helper', __FILE__)
19
-
20
- class IssueStatusesControllerTest < ActionController::TestCase
21
- fixtures :issue_statuses, :issues, :users, :trackers
22
-
23
- def setup
24
- User.current = nil
25
- @request.session[:user_id] = 1 # admin
26
- end
27
-
28
- def test_index
29
- get :index
30
- assert_response :success
31
- assert_template 'index'
32
- end
33
-
34
- def test_index_by_anonymous_should_redirect_to_login_form
35
- @request.session[:user_id] = nil
36
- get :index
37
- assert_redirected_to '/login?back_url=http%3A%2F%2Ftest.host%2Fissue_statuses'
38
- end
39
-
40
- def test_index_by_user_should_respond_with_406
41
- @request.session[:user_id] = 2
42
- get :index
43
- assert_response 406
44
- end
45
-
46
- def test_new
47
- get :new
48
- assert_response :success
49
- assert_template 'new'
50
- end
51
-
52
- def test_create
53
- assert_difference 'IssueStatus.count' do
54
- post :create, :issue_status => {:name => 'New status'}
55
- end
56
- assert_redirected_to :action => 'index'
57
- status = IssueStatus.order('id DESC').first
58
- assert_equal 'New status', status.name
59
- end
60
-
61
- def test_create_with_failure
62
- post :create, :issue_status => {:name => ''}
63
- assert_response :success
64
- assert_template 'new'
65
- assert_select_error /name cannot be blank/i
66
- end
67
-
68
- def test_edit
69
- get :edit, :id => '3'
70
- assert_response :success
71
- assert_template 'edit'
72
- end
73
-
74
- def test_update
75
- put :update, :id => '3', :issue_status => {:name => 'Renamed status'}
76
- assert_redirected_to :action => 'index'
77
- status = IssueStatus.find(3)
78
- assert_equal 'Renamed status', status.name
79
- end
80
-
81
- def test_update_with_failure
82
- put :update, :id => '3', :issue_status => {:name => ''}
83
- assert_response :success
84
- assert_template 'edit'
85
- assert_select_error /name cannot be blank/i
86
- end
87
-
88
- def test_destroy
89
- Issue.where(:status_id => 1).delete_all
90
- Tracker.where(:default_status_id => 1).delete_all
91
-
92
- assert_difference 'IssueStatus.count', -1 do
93
- delete :destroy, :id => '1'
94
- end
95
- assert_redirected_to :action => 'index'
96
- assert_nil IssueStatus.find_by_id(1)
97
- end
98
-
99
- def test_destroy_should_block_if_status_is_used_by_issues
100
- assert Issue.where(:status_id => 1).any?
101
- Tracker.where(:default_status_id => 1).delete_all
102
-
103
- assert_no_difference 'IssueStatus.count' do
104
- delete :destroy, :id => '1'
105
- end
106
- assert_redirected_to :action => 'index'
107
- assert_not_nil IssueStatus.find_by_id(1)
108
- end
109
-
110
- def test_destroy_should_block_if_status_is_used_as_tracker_default_status
111
- Issue.where(:status_id => 1).delete_all
112
- assert Tracker.where(:default_status_id => 1).any?
113
-
114
- assert_no_difference 'IssueStatus.count' do
115
- delete :destroy, :id => '1'
116
- end
117
- assert_redirected_to :action => 'index'
118
- assert_not_nil IssueStatus.find_by_id(1)
119
- end
120
-
121
- def test_update_issue_done_ratio_with_issue_done_ratio_set_to_issue_field
122
- with_settings :issue_done_ratio => 'issue_field' do
123
- post :update_issue_done_ratio
124
- assert_match /not updated/, flash[:error].to_s
125
- assert_redirected_to '/issue_statuses'
126
- end
127
- end
128
-
129
- def test_update_issue_done_ratio_with_issue_done_ratio_set_to_issue_status
130
- with_settings :issue_done_ratio => 'issue_status' do
131
- post :update_issue_done_ratio
132
- assert_match /Issue done ratios updated/, flash[:notice].to_s
133
- assert_redirected_to '/issue_statuses'
134
- end
135
- end
136
- end
@@ -1,4273 +0,0 @@
1
- # Redmine - project management software
2
- # Copyright (C) 2006-2015 Jean-Philippe Lang
3
- #
4
- # This program is free software; you can redistribute it and/or
5
- # modify it under the terms of the GNU General Public License
6
- # as published by the Free Software Foundation; either version 2
7
- # of the License, or (at your option) any later version.
8
- #
9
- # This program is distributed in the hope that it will be useful,
10
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
11
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
- # GNU General Public License for more details.
13
- #
14
- # You should have received a copy of the GNU General Public License
15
- # along with this program; if not, write to the Free Software
16
- # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17
-
18
- require File.expand_path('../../test_helper', __FILE__)
19
-
20
- class IssuesControllerTest < ActionController::TestCase
21
- fixtures :projects,
22
- :users, :email_addresses,
23
- :roles,
24
- :members,
25
- :member_roles,
26
- :issues,
27
- :issue_statuses,
28
- :issue_relations,
29
- :versions,
30
- :trackers,
31
- :projects_trackers,
32
- :issue_categories,
33
- :enabled_modules,
34
- :enumerations,
35
- :attachments,
36
- :workflows,
37
- :custom_fields,
38
- :custom_values,
39
- :custom_fields_projects,
40
- :custom_fields_trackers,
41
- :time_entries,
42
- :journals,
43
- :journal_details,
44
- :queries,
45
- :repositories,
46
- :changesets
47
-
48
- include Redmine::I18n
49
-
50
- def setup
51
- User.current = nil
52
- end
53
-
54
- def test_index
55
- with_settings :default_language => "en" do
56
- get :index
57
- assert_response :success
58
- assert_template 'index'
59
- assert_not_nil assigns(:issues)
60
- assert_nil assigns(:project)
61
-
62
- # links to visible issues
63
- assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/
64
- assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
65
- # private projects hidden
66
- assert_select 'a[href="/issues/6"]', 0
67
- assert_select 'a[href="/issues/4"]', 0
68
- # project column
69
- assert_select 'th', :text => /Project/
70
- end
71
- end
72
-
73
- def test_index_should_not_list_issues_when_module_disabled
74
- EnabledModule.delete_all("name = 'issue_tracking' AND project_id = 1")
75
- get :index
76
- assert_response :success
77
- assert_template 'index'
78
- assert_not_nil assigns(:issues)
79
- assert_nil assigns(:project)
80
-
81
- assert_select 'a[href="/issues/1"]', 0
82
- assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
83
- end
84
-
85
- def test_index_should_list_visible_issues_only
86
- get :index, :per_page => 100
87
- assert_response :success
88
- assert_not_nil assigns(:issues)
89
- assert_nil assigns(:issues).detect {|issue| !issue.visible?}
90
- end
91
-
92
- def test_index_with_project
93
- Setting.display_subprojects_issues = 0
94
- get :index, :project_id => 1
95
- assert_response :success
96
- assert_template 'index'
97
- assert_not_nil assigns(:issues)
98
-
99
- assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/
100
- assert_select 'a[href="/issues/5"]', 0
101
- end
102
-
103
- def test_index_with_project_and_subprojects
104
- Setting.display_subprojects_issues = 1
105
- get :index, :project_id => 1
106
- assert_response :success
107
- assert_template 'index'
108
- assert_not_nil assigns(:issues)
109
-
110
- assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/
111
- assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
112
- assert_select 'a[href="/issues/6"]', 0
113
- end
114
-
115
- def test_index_with_project_and_subprojects_should_show_private_subprojects_with_permission
116
- @request.session[:user_id] = 2
117
- Setting.display_subprojects_issues = 1
118
- get :index, :project_id => 1
119
- assert_response :success
120
- assert_template 'index'
121
- assert_not_nil assigns(:issues)
122
-
123
- assert_select 'a[href="/issues/1"]', :text => /Cannot print recipes/
124
- assert_select 'a[href="/issues/5"]', :text => /Subproject issue/
125
- assert_select 'a[href="/issues/6"]', :text => /Issue of a private subproject/
126
- end
127
-
128
- def test_index_with_project_and_default_filter
129
- get :index, :project_id => 1, :set_filter => 1
130
- assert_response :success
131
- assert_template 'index'
132
- assert_not_nil assigns(:issues)
133
-
134
- query = assigns(:query)
135
- assert_not_nil query
136
- # default filter
137
- assert_equal({'status_id' => {:operator => 'o', :values => ['']}}, query.filters)
138
- end
139
-
140
- def test_index_with_project_and_filter
141
- get :index, :project_id => 1, :set_filter => 1,
142
- :f => ['tracker_id'],
143
- :op => {'tracker_id' => '='},
144
- :v => {'tracker_id' => ['1']}
145
- assert_response :success
146
- assert_template 'index'
147
- assert_not_nil assigns(:issues)
148
-
149
- query = assigns(:query)
150
- assert_not_nil query
151
- assert_equal({'tracker_id' => {:operator => '=', :values => ['1']}}, query.filters)
152
- end
153
-
154
- def test_index_with_short_filters
155
- to_test = {
156
- 'status_id' => {
157
- 'o' => { :op => 'o', :values => [''] },
158
- 'c' => { :op => 'c', :values => [''] },
159
- '7' => { :op => '=', :values => ['7'] },
160
- '7|3|4' => { :op => '=', :values => ['7', '3', '4'] },
161
- '=7' => { :op => '=', :values => ['7'] },
162
- '!3' => { :op => '!', :values => ['3'] },
163
- '!7|3|4' => { :op => '!', :values => ['7', '3', '4'] }},
164
- 'subject' => {
165
- 'This is a subject' => { :op => '=', :values => ['This is a subject'] },
166
- 'o' => { :op => '=', :values => ['o'] },
167
- '~This is part of a subject' => { :op => '~', :values => ['This is part of a subject'] },
168
- '!~This is part of a subject' => { :op => '!~', :values => ['This is part of a subject'] }},
169
- 'tracker_id' => {
170
- '3' => { :op => '=', :values => ['3'] },
171
- '=3' => { :op => '=', :values => ['3'] }},
172
- 'start_date' => {
173
- '2011-10-12' => { :op => '=', :values => ['2011-10-12'] },
174
- '=2011-10-12' => { :op => '=', :values => ['2011-10-12'] },
175
- '>=2011-10-12' => { :op => '>=', :values => ['2011-10-12'] },
176
- '<=2011-10-12' => { :op => '<=', :values => ['2011-10-12'] },
177
- '><2011-10-01|2011-10-30' => { :op => '><', :values => ['2011-10-01', '2011-10-30'] },
178
- '<t+2' => { :op => '<t+', :values => ['2'] },
179
- '>t+2' => { :op => '>t+', :values => ['2'] },
180
- 't+2' => { :op => 't+', :values => ['2'] },
181
- 't' => { :op => 't', :values => [''] },
182
- 'w' => { :op => 'w', :values => [''] },
183
- '>t-2' => { :op => '>t-', :values => ['2'] },
184
- '<t-2' => { :op => '<t-', :values => ['2'] },
185
- 't-2' => { :op => 't-', :values => ['2'] }},
186
- 'created_on' => {
187
- '>=2011-10-12' => { :op => '>=', :values => ['2011-10-12'] },
188
- '<t-2' => { :op => '<t-', :values => ['2'] },
189
- '>t-2' => { :op => '>t-', :values => ['2'] },
190
- 't-2' => { :op => 't-', :values => ['2'] }},
191
- 'cf_1' => {
192
- 'c' => { :op => '=', :values => ['c'] },
193
- '!c' => { :op => '!', :values => ['c'] },
194
- '!*' => { :op => '!*', :values => [''] },
195
- '*' => { :op => '*', :values => [''] }},
196
- 'estimated_hours' => {
197
- '=13.4' => { :op => '=', :values => ['13.4'] },
198
- '>=45' => { :op => '>=', :values => ['45'] },
199
- '<=125' => { :op => '<=', :values => ['125'] },
200
- '><10.5|20.5' => { :op => '><', :values => ['10.5', '20.5'] },
201
- '!*' => { :op => '!*', :values => [''] },
202
- '*' => { :op => '*', :values => [''] }}
203
- }
204
-
205
- default_filter = { 'status_id' => {:operator => 'o', :values => [''] }}
206
-
207
- to_test.each do |field, expression_and_expected|
208
- expression_and_expected.each do |filter_expression, expected|
209
-
210
- get :index, :set_filter => 1, field => filter_expression
211
-
212
- assert_response :success
213
- assert_template 'index'
214
- assert_not_nil assigns(:issues)
215
-
216
- query = assigns(:query)
217
- assert_not_nil query
218
- assert query.has_filter?(field)
219
- assert_equal(default_filter.merge({field => {:operator => expected[:op], :values => expected[:values]}}), query.filters)
220
- end
221
- end
222
- end
223
-
224
- def test_index_with_project_and_empty_filters
225
- get :index, :project_id => 1, :set_filter => 1, :fields => ['']
226
- assert_response :success
227
- assert_template 'index'
228
- assert_not_nil assigns(:issues)
229
-
230
- query = assigns(:query)
231
- assert_not_nil query
232
- # no filter
233
- assert_equal({}, query.filters)
234
- end
235
-
236
- def test_index_with_project_custom_field_filter
237
- field = ProjectCustomField.create!(:name => 'Client', :is_filter => true, :field_format => 'string')
238
- CustomValue.create!(:custom_field => field, :customized => Project.find(3), :value => 'Foo')
239
- CustomValue.create!(:custom_field => field, :customized => Project.find(5), :value => 'Foo')
240
- filter_name = "project.cf_#{field.id}"
241
- @request.session[:user_id] = 1
242
-
243
- get :index, :set_filter => 1,
244
- :f => [filter_name],
245
- :op => {filter_name => '='},
246
- :v => {filter_name => ['Foo']}
247
- assert_response :success
248
- assert_template 'index'
249
- assert_equal [3, 5], assigns(:issues).map(&:project_id).uniq.sort
250
- end
251
-
252
- def test_index_with_query
253
- get :index, :project_id => 1, :query_id => 5
254
- assert_response :success
255
- assert_template 'index'
256
- assert_not_nil assigns(:issues)
257
- assert_nil assigns(:issue_count_by_group)
258
- end
259
-
260
- def test_index_with_query_grouped_by_tracker
261
- get :index, :project_id => 1, :query_id => 6
262
- assert_response :success
263
- assert_template 'index'
264
- assert_not_nil assigns(:issues)
265
- assert_not_nil assigns(:issue_count_by_group)
266
- end
267
-
268
- def test_index_with_query_grouped_and_sorted_by_category
269
- get :index, :project_id => 1, :set_filter => 1, :group_by => "category", :sort => "category"
270
- assert_response :success
271
- assert_template 'index'
272
- assert_not_nil assigns(:issues)
273
- assert_not_nil assigns(:issue_count_by_group)
274
- end
275
-
276
- def test_index_with_query_grouped_by_list_custom_field
277
- get :index, :project_id => 1, :query_id => 9
278
- assert_response :success
279
- assert_template 'index'
280
- assert_not_nil assigns(:issues)
281
- assert_not_nil assigns(:issue_count_by_group)
282
- end
283
-
284
- def test_index_with_query_grouped_by_user_custom_field
285
- cf = IssueCustomField.create!(:name => 'User', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'user')
286
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(1), :value => '2')
287
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(2), :value => '3')
288
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(3), :value => '3')
289
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(5), :value => '')
290
-
291
- get :index, :project_id => 1, :set_filter => 1, :group_by => "cf_#{cf.id}"
292
- assert_response :success
293
-
294
- assert_select 'tr.group', 3
295
- assert_select 'tr.group' do
296
- assert_select 'a', :text => 'John Smith'
297
- assert_select 'span.count', :text => '1'
298
- end
299
- assert_select 'tr.group' do
300
- assert_select 'a', :text => 'Dave Lopper'
301
- assert_select 'span.count', :text => '2'
302
- end
303
- end
304
-
305
- def test_index_grouped_by_boolean_custom_field_should_distinguish_blank_and_false_values
306
- cf = IssueCustomField.create!(:name => 'Bool', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'bool')
307
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(1), :value => '1')
308
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(2), :value => '0')
309
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(3), :value => '')
310
-
311
- with_settings :default_language => 'en' do
312
- get :index, :project_id => 1, :set_filter => 1, :group_by => "cf_#{cf.id}"
313
- assert_response :success
314
- end
315
-
316
- assert_select 'tr.group', 3
317
- assert_select 'tr.group', :text => /Yes/
318
- assert_select 'tr.group', :text => /No/
319
- assert_select 'tr.group', :text => /blank/
320
- end
321
-
322
- def test_index_grouped_by_boolean_custom_field_with_false_group_in_first_position_should_show_the_group
323
- cf = IssueCustomField.create!(:name => 'Bool', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'bool', :is_filter => true)
324
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(1), :value => '0')
325
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(2), :value => '0')
326
-
327
- with_settings :default_language => 'en' do
328
- get :index, :project_id => 1, :set_filter => 1, "cf_#{cf.id}" => "*", :group_by => "cf_#{cf.id}"
329
- assert_response :success
330
- assert_equal [1, 2], assigns(:issues).map(&:id).sort
331
- end
332
-
333
- assert_select 'tr.group', 1
334
- assert_select 'tr.group', :text => /No/
335
- end
336
-
337
- def test_index_with_query_grouped_by_tracker_in_normal_order
338
- 3.times {|i| Issue.generate!(:tracker_id => (i + 1))}
339
-
340
- get :index, :set_filter => 1, :group_by => 'tracker', :sort => 'id:desc'
341
- assert_response :success
342
-
343
- trackers = assigns(:issues).map(&:tracker).uniq
344
- assert_equal [1, 2, 3], trackers.map(&:id)
345
- end
346
-
347
- def test_index_with_query_grouped_by_tracker_in_reverse_order
348
- 3.times {|i| Issue.generate!(:tracker_id => (i + 1))}
349
-
350
- get :index, :set_filter => 1, :group_by => 'tracker', :sort => 'id:desc,tracker:desc'
351
- assert_response :success
352
-
353
- trackers = assigns(:issues).map(&:tracker).uniq
354
- assert_equal [3, 2, 1], trackers.map(&:id)
355
- end
356
-
357
- def test_index_with_query_id_and_project_id_should_set_session_query
358
- get :index, :project_id => 1, :query_id => 4
359
- assert_response :success
360
- assert_kind_of Hash, session[:query]
361
- assert_equal 4, session[:query][:id]
362
- assert_equal 1, session[:query][:project_id]
363
- end
364
-
365
- def test_index_with_invalid_query_id_should_respond_404
366
- get :index, :project_id => 1, :query_id => 999
367
- assert_response 404
368
- end
369
-
370
- def test_index_with_cross_project_query_in_session_should_show_project_issues
371
- q = IssueQuery.create!(:name => "test", :user_id => 2, :visibility => IssueQuery::VISIBILITY_PRIVATE, :project => nil)
372
- @request.session[:query] = {:id => q.id, :project_id => 1}
373
-
374
- with_settings :display_subprojects_issues => '0' do
375
- get :index, :project_id => 1
376
- end
377
- assert_response :success
378
- assert_not_nil assigns(:query)
379
- assert_equal q.id, assigns(:query).id
380
- assert_equal 1, assigns(:query).project_id
381
- assert_equal [1], assigns(:issues).map(&:project_id).uniq
382
- end
383
-
384
- def test_private_query_should_not_be_available_to_other_users
385
- q = IssueQuery.create!(:name => "private", :user => User.find(2), :visibility => IssueQuery::VISIBILITY_PRIVATE, :project => nil)
386
- @request.session[:user_id] = 3
387
-
388
- get :index, :query_id => q.id
389
- assert_response 403
390
- end
391
-
392
- def test_private_query_should_be_available_to_its_user
393
- q = IssueQuery.create!(:name => "private", :user => User.find(2), :visibility => IssueQuery::VISIBILITY_PRIVATE, :project => nil)
394
- @request.session[:user_id] = 2
395
-
396
- get :index, :query_id => q.id
397
- assert_response :success
398
- end
399
-
400
- def test_public_query_should_be_available_to_other_users
401
- q = IssueQuery.create!(:name => "private", :user => User.find(2), :visibility => IssueQuery::VISIBILITY_PUBLIC, :project => nil)
402
- @request.session[:user_id] = 3
403
-
404
- get :index, :query_id => q.id
405
- assert_response :success
406
- end
407
-
408
- def test_index_should_omit_page_param_in_export_links
409
- get :index, :page => 2
410
- assert_response :success
411
- assert_select 'a.atom[href="/issues.atom"]'
412
- assert_select 'a.csv[href="/issues.csv"]'
413
- assert_select 'a.pdf[href="/issues.pdf"]'
414
- assert_select 'form#csv-export-form[action="/issues.csv"]'
415
- end
416
-
417
- def test_index_should_not_warn_when_not_exceeding_export_limit
418
- with_settings :issues_export_limit => 200 do
419
- get :index
420
- assert_select '#csv-export-options p.icon-warning', 0
421
- end
422
- end
423
-
424
- def test_index_should_warn_when_exceeding_export_limit
425
- with_settings :issues_export_limit => 2 do
426
- get :index
427
- assert_select '#csv-export-options p.icon-warning', :text => %r{limit: 2}
428
- end
429
- end
430
-
431
- def test_index_csv
432
- get :index, :format => 'csv'
433
- assert_response :success
434
- assert_not_nil assigns(:issues)
435
- assert_equal 'text/csv; header=present', @response.content_type
436
- assert @response.body.starts_with?("#,")
437
- lines = @response.body.chomp.split("\n")
438
- assert_equal assigns(:query).columns.size, lines[0].split(',').size
439
- end
440
-
441
- def test_index_csv_with_project
442
- get :index, :project_id => 1, :format => 'csv'
443
- assert_response :success
444
- assert_not_nil assigns(:issues)
445
- assert_equal 'text/csv; header=present', @response.content_type
446
- end
447
-
448
- def test_index_csv_with_description
449
- Issue.generate!(:description => 'test_index_csv_with_description')
450
-
451
- with_settings :default_language => 'en' do
452
- get :index, :format => 'csv', :description => '1'
453
- assert_response :success
454
- assert_not_nil assigns(:issues)
455
- end
456
-
457
- assert_equal 'text/csv; header=present', response.content_type
458
- headers = response.body.chomp.split("\n").first.split(',')
459
- assert_include 'Description', headers
460
- assert_include 'test_index_csv_with_description', response.body
461
- end
462
-
463
- def test_index_csv_with_spent_time_column
464
- issue = Issue.create!(:project_id => 1, :tracker_id => 1, :subject => 'test_index_csv_with_spent_time_column', :author_id => 2)
465
- TimeEntry.create!(:project => issue.project, :issue => issue, :hours => 7.33, :user => User.find(2), :spent_on => Date.today)
466
-
467
- get :index, :format => 'csv', :set_filter => '1', :c => %w(subject spent_hours)
468
- assert_response :success
469
- assert_equal 'text/csv; header=present', @response.content_type
470
- lines = @response.body.chomp.split("\n")
471
- assert_include "#{issue.id},#{issue.subject},7.33", lines
472
- end
473
-
474
- def test_index_csv_with_all_columns
475
- get :index, :format => 'csv', :columns => 'all'
476
- assert_response :success
477
- assert_not_nil assigns(:issues)
478
- assert_equal 'text/csv; header=present', @response.content_type
479
- assert_match /\A#,/, response.body
480
- lines = response.body.chomp.split("\n")
481
- assert_equal assigns(:query).available_inline_columns.size, lines[0].split(',').size
482
- end
483
-
484
- def test_index_csv_with_multi_column_field
485
- CustomField.find(1).update_attribute :multiple, true
486
- issue = Issue.find(1)
487
- issue.custom_field_values = {1 => ['MySQL', 'Oracle']}
488
- issue.save!
489
-
490
- get :index, :format => 'csv', :columns => 'all'
491
- assert_response :success
492
- lines = @response.body.chomp.split("\n")
493
- assert lines.detect {|line| line.include?('"MySQL, Oracle"')}
494
- end
495
-
496
- def test_index_csv_should_format_float_custom_fields_with_csv_decimal_separator
497
- field = IssueCustomField.create!(:name => 'Float', :is_for_all => true, :tracker_ids => [1], :field_format => 'float')
498
- issue = Issue.generate!(:project_id => 1, :tracker_id => 1, :custom_field_values => {field.id => '185.6'})
499
-
500
- with_settings :default_language => 'fr' do
501
- get :index, :format => 'csv', :columns => 'all'
502
- assert_response :success
503
- issue_line = response.body.chomp.split("\n").map {|line| line.split(';')}.detect {|line| line[0]==issue.id.to_s}
504
- assert_include '185,60', issue_line
505
- end
506
-
507
- with_settings :default_language => 'en' do
508
- get :index, :format => 'csv', :columns => 'all'
509
- assert_response :success
510
- issue_line = response.body.chomp.split("\n").map {|line| line.split(',')}.detect {|line| line[0]==issue.id.to_s}
511
- assert_include '185.60', issue_line
512
- end
513
- end
514
-
515
- def test_index_csv_should_fill_parent_column_with_parent_id
516
- Issue.delete_all
517
- parent = Issue.generate!
518
- child = Issue.generate!(:parent_issue_id => parent.id)
519
-
520
- with_settings :default_language => 'en' do
521
- get :index, :format => 'csv', :c => %w(parent)
522
- end
523
- lines = response.body.split("\n")
524
- assert_include "#{child.id},#{parent.id}", lines
525
- end
526
-
527
- def test_index_csv_big_5
528
- with_settings :default_language => "zh-TW" do
529
- str_utf8 = "\xe4\xb8\x80\xe6\x9c\x88".force_encoding('UTF-8')
530
- str_big5 = "\xa4@\xa4\xeb".force_encoding('Big5')
531
- issue = Issue.generate!(:subject => str_utf8)
532
-
533
- get :index, :project_id => 1,
534
- :f => ['subject'],
535
- :op => '=', :values => [str_utf8],
536
- :format => 'csv'
537
- assert_equal 'text/csv; header=present', @response.content_type
538
- lines = @response.body.chomp.split("\n")
539
- header = lines[0]
540
- status = "\xaa\xac\xbaA".force_encoding('Big5')
541
- assert header.include?(status)
542
- issue_line = lines.find {|l| l =~ /^#{issue.id},/}
543
- assert issue_line.include?(str_big5)
544
- end
545
- end
546
-
547
- def test_index_csv_cannot_convert_should_be_replaced_big_5
548
- with_settings :default_language => "zh-TW" do
549
- str_utf8 = "\xe4\xbb\xa5\xe5\x86\x85".force_encoding('UTF-8')
550
- issue = Issue.generate!(:subject => str_utf8)
551
-
552
- get :index, :project_id => 1,
553
- :f => ['subject'],
554
- :op => '=', :values => [str_utf8],
555
- :c => ['status', 'subject'],
556
- :format => 'csv',
557
- :set_filter => 1
558
- assert_equal 'text/csv; header=present', @response.content_type
559
- lines = @response.body.chomp.split("\n")
560
- header = lines[0]
561
- issue_line = lines.find {|l| l =~ /^#{issue.id},/}
562
- s1 = "\xaa\xac\xbaA".force_encoding('Big5') # status
563
- assert header.include?(s1)
564
- s2 = issue_line.split(",")[2]
565
- s3 = "\xa5H?".force_encoding('Big5') # subject
566
- assert_equal s3, s2
567
- end
568
- end
569
-
570
- def test_index_csv_tw
571
- with_settings :default_language => "zh-TW" do
572
- str1 = "test_index_csv_tw"
573
- issue = Issue.generate!(:subject => str1, :estimated_hours => '1234.5')
574
-
575
- get :index, :project_id => 1,
576
- :f => ['subject'],
577
- :op => '=', :values => [str1],
578
- :c => ['estimated_hours', 'subject'],
579
- :format => 'csv',
580
- :set_filter => 1
581
- assert_equal 'text/csv; header=present', @response.content_type
582
- lines = @response.body.chomp.split("\n")
583
- assert_include "#{issue.id},1234.50,#{str1}", lines
584
- end
585
- end
586
-
587
- def test_index_csv_fr
588
- with_settings :default_language => "fr" do
589
- str1 = "test_index_csv_fr"
590
- issue = Issue.generate!(:subject => str1, :estimated_hours => '1234.5')
591
-
592
- get :index, :project_id => 1,
593
- :f => ['subject'],
594
- :op => '=', :values => [str1],
595
- :c => ['estimated_hours', 'subject'],
596
- :format => 'csv',
597
- :set_filter => 1
598
- assert_equal 'text/csv; header=present', @response.content_type
599
- lines = @response.body.chomp.split("\n")
600
- assert_include "#{issue.id};1234,50;#{str1}", lines
601
- end
602
- end
603
-
604
- def test_index_pdf
605
- ["en", "zh", "zh-TW", "ja", "ko"].each do |lang|
606
- with_settings :default_language => lang do
607
-
608
- get :index
609
- assert_response :success
610
- assert_template 'index'
611
-
612
- get :index, :format => 'pdf'
613
- assert_response :success
614
- assert_not_nil assigns(:issues)
615
- assert_equal 'application/pdf', @response.content_type
616
-
617
- get :index, :project_id => 1, :format => 'pdf'
618
- assert_response :success
619
- assert_not_nil assigns(:issues)
620
- assert_equal 'application/pdf', @response.content_type
621
-
622
- get :index, :project_id => 1, :query_id => 6, :format => 'pdf'
623
- assert_response :success
624
- assert_not_nil assigns(:issues)
625
- assert_equal 'application/pdf', @response.content_type
626
- end
627
- end
628
- end
629
-
630
- def test_index_pdf_with_query_grouped_by_list_custom_field
631
- get :index, :project_id => 1, :query_id => 9, :format => 'pdf'
632
- assert_response :success
633
- assert_not_nil assigns(:issues)
634
- assert_not_nil assigns(:issue_count_by_group)
635
- assert_equal 'application/pdf', @response.content_type
636
- end
637
-
638
- def test_index_atom
639
- get :index, :project_id => 'ecookbook', :format => 'atom'
640
- assert_response :success
641
- assert_template 'common/feed'
642
- assert_equal 'application/atom+xml', response.content_type
643
-
644
- assert_select 'feed' do
645
- assert_select 'link[rel=self][href=?]', 'http://test.host/projects/ecookbook/issues.atom'
646
- assert_select 'link[rel=alternate][href=?]', 'http://test.host/projects/ecookbook/issues'
647
- assert_select 'entry link[href=?]', 'http://test.host/issues/1'
648
- end
649
- end
650
-
651
- def test_index_sort
652
- get :index, :sort => 'tracker,id:desc'
653
- assert_response :success
654
-
655
- sort_params = @request.session['issues_index_sort']
656
- assert sort_params.is_a?(String)
657
- assert_equal 'tracker,id:desc', sort_params
658
-
659
- issues = assigns(:issues)
660
- assert_not_nil issues
661
- assert !issues.empty?
662
- assert_equal issues.sort {|a,b| a.tracker == b.tracker ? b.id <=> a.id : a.tracker <=> b.tracker }.collect(&:id), issues.collect(&:id)
663
- assert_select 'table.issues.sort-by-tracker.sort-asc'
664
- end
665
-
666
- def test_index_sort_by_field_not_included_in_columns
667
- Setting.issue_list_default_columns = %w(subject author)
668
- get :index, :sort => 'tracker'
669
- end
670
-
671
- def test_index_sort_by_assigned_to
672
- get :index, :sort => 'assigned_to'
673
- assert_response :success
674
- assignees = assigns(:issues).collect(&:assigned_to).compact
675
- assert_equal assignees.sort, assignees
676
- assert_select 'table.issues.sort-by-assigned-to.sort-asc'
677
- end
678
-
679
- def test_index_sort_by_assigned_to_desc
680
- get :index, :sort => 'assigned_to:desc'
681
- assert_response :success
682
- assignees = assigns(:issues).collect(&:assigned_to).compact
683
- assert_equal assignees.sort.reverse, assignees
684
- assert_select 'table.issues.sort-by-assigned-to.sort-desc'
685
- end
686
-
687
- def test_index_group_by_assigned_to
688
- get :index, :group_by => 'assigned_to', :sort => 'priority'
689
- assert_response :success
690
- end
691
-
692
- def test_index_sort_by_author
693
- get :index, :sort => 'author'
694
- assert_response :success
695
- authors = assigns(:issues).collect(&:author)
696
- assert_equal authors.sort, authors
697
- end
698
-
699
- def test_index_sort_by_author_desc
700
- get :index, :sort => 'author:desc'
701
- assert_response :success
702
- authors = assigns(:issues).collect(&:author)
703
- assert_equal authors.sort.reverse, authors
704
- end
705
-
706
- def test_index_group_by_author
707
- get :index, :group_by => 'author', :sort => 'priority'
708
- assert_response :success
709
- end
710
-
711
- def test_index_sort_by_spent_hours
712
- get :index, :sort => 'spent_hours:desc'
713
- assert_response :success
714
- hours = assigns(:issues).collect(&:spent_hours)
715
- assert_equal hours.sort.reverse, hours
716
- end
717
-
718
- def test_index_sort_by_total_spent_hours
719
- get :index, :sort => 'total_spent_hours:desc'
720
- assert_response :success
721
- hours = assigns(:issues).collect(&:total_spent_hours)
722
- assert_equal hours.sort.reverse, hours
723
- end
724
-
725
- def test_index_sort_by_user_custom_field
726
- cf = IssueCustomField.create!(:name => 'User', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'user')
727
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(1), :value => '2')
728
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(2), :value => '3')
729
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(3), :value => '3')
730
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(5), :value => '')
731
-
732
- get :index, :project_id => 1, :set_filter => 1, :sort => "cf_#{cf.id},id"
733
- assert_response :success
734
-
735
- assert_equal [2, 3, 1], assigns(:issues).select {|issue| issue.custom_field_value(cf).present?}.map(&:id)
736
- end
737
-
738
- def test_index_with_columns
739
- columns = ['tracker', 'subject', 'assigned_to']
740
- get :index, :set_filter => 1, :c => columns
741
- assert_response :success
742
-
743
- # query should use specified columns
744
- query = assigns(:query)
745
- assert_kind_of IssueQuery, query
746
- assert_equal columns, query.column_names.map(&:to_s)
747
-
748
- # columns should be stored in session
749
- assert_kind_of Hash, session[:query]
750
- assert_kind_of Array, session[:query][:column_names]
751
- assert_equal columns, session[:query][:column_names].map(&:to_s)
752
-
753
- # ensure only these columns are kept in the selected columns list
754
- assert_select 'select#selected_columns option' do
755
- assert_select 'option', 3
756
- assert_select 'option[value=tracker]'
757
- assert_select 'option[value=project]', 0
758
- end
759
- end
760
-
761
- def test_index_without_project_should_implicitly_add_project_column_to_default_columns
762
- Setting.issue_list_default_columns = ['tracker', 'subject', 'assigned_to']
763
- get :index, :set_filter => 1
764
-
765
- # query should use specified columns
766
- query = assigns(:query)
767
- assert_kind_of IssueQuery, query
768
- assert_equal [:id, :project, :tracker, :subject, :assigned_to], query.columns.map(&:name)
769
- end
770
-
771
- def test_index_without_project_and_explicit_default_columns_should_not_add_project_column
772
- Setting.issue_list_default_columns = ['tracker', 'subject', 'assigned_to']
773
- columns = ['id', 'tracker', 'subject', 'assigned_to']
774
- get :index, :set_filter => 1, :c => columns
775
-
776
- # query should use specified columns
777
- query = assigns(:query)
778
- assert_kind_of IssueQuery, query
779
- assert_equal columns.map(&:to_sym), query.columns.map(&:name)
780
- end
781
-
782
- def test_index_with_default_columns_should_respect_default_columns_order
783
- columns = ['assigned_to', 'subject', 'status', 'tracker']
784
- with_settings :issue_list_default_columns => columns do
785
- get :index, :project_id => 1, :set_filter => 1
786
-
787
- query = assigns(:query)
788
- assert_equal (['id'] + columns).map(&:to_sym), query.columns.map(&:name)
789
- end
790
- end
791
-
792
- def test_index_with_custom_field_column
793
- columns = %w(tracker subject cf_2)
794
- get :index, :set_filter => 1, :c => columns
795
- assert_response :success
796
-
797
- # query should use specified columns
798
- query = assigns(:query)
799
- assert_kind_of IssueQuery, query
800
- assert_equal columns, query.column_names.map(&:to_s)
801
-
802
- assert_select 'table.issues td.cf_2.string'
803
- end
804
-
805
- def test_index_with_multi_custom_field_column
806
- field = CustomField.find(1)
807
- field.update_attribute :multiple, true
808
- issue = Issue.find(1)
809
- issue.custom_field_values = {1 => ['MySQL', 'Oracle']}
810
- issue.save!
811
-
812
- get :index, :set_filter => 1, :c => %w(tracker subject cf_1)
813
- assert_response :success
814
-
815
- assert_select 'table.issues td.cf_1', :text => 'MySQL, Oracle'
816
- end
817
-
818
- def test_index_with_multi_user_custom_field_column
819
- field = IssueCustomField.create!(:name => 'Multi user', :field_format => 'user', :multiple => true,
820
- :tracker_ids => [1], :is_for_all => true)
821
- issue = Issue.find(1)
822
- issue.custom_field_values = {field.id => ['2', '3']}
823
- issue.save!
824
-
825
- get :index, :set_filter => 1, :c => ['tracker', 'subject', "cf_#{field.id}"]
826
- assert_response :success
827
-
828
- assert_select "table.issues td.cf_#{field.id}" do
829
- assert_select 'a', 2
830
- assert_select 'a[href=?]', '/users/2', :text => 'John Smith'
831
- assert_select 'a[href=?]', '/users/3', :text => 'Dave Lopper'
832
- end
833
- end
834
-
835
- def test_index_with_date_column
836
- with_settings :date_format => '%d/%m/%Y' do
837
- Issue.find(1).update_attribute :start_date, '1987-08-24'
838
- get :index, :set_filter => 1, :c => %w(start_date)
839
- assert_select "table.issues td.start_date", :text => '24/08/1987'
840
- end
841
- end
842
-
843
- def test_index_with_done_ratio_column
844
- Issue.find(1).update_attribute :done_ratio, 40
845
- get :index, :set_filter => 1, :c => %w(done_ratio)
846
- assert_select 'table.issues td.done_ratio' do
847
- assert_select 'table.progress' do
848
- assert_select 'td.closed[style=?]', 'width: 40%;'
849
- end
850
- end
851
- end
852
-
853
- def test_index_with_spent_hours_column
854
- Issue.expects(:load_visible_spent_hours).once
855
- get :index, :set_filter => 1, :c => %w(subject spent_hours)
856
- assert_select 'table.issues tr#issue-3 td.spent_hours', :text => '1.00'
857
- end
858
-
859
- def test_index_with_total_spent_hours_column
860
- Issue.expects(:load_visible_total_spent_hours).once
861
- get :index, :set_filter => 1, :c => %w(subject total_spent_hours)
862
- assert_select 'table.issues tr#issue-3 td.total_spent_hours', :text => '1.00'
863
- end
864
-
865
- def test_index_should_not_show_spent_hours_column_without_permission
866
- Role.anonymous.remove_permission! :view_time_entries
867
- get :index, :set_filter => 1, :c => %w(subject spent_hours)
868
- assert_select 'td.spent_hours', 0
869
- end
870
-
871
- def test_index_with_fixed_version_column
872
- get :index, :set_filter => 1, :c => %w(fixed_version)
873
- assert_select 'table.issues td.fixed_version' do
874
- assert_select 'a[href=?]', '/versions/2', :text => 'eCookbook - 1.0'
875
- end
876
- end
877
-
878
- def test_index_with_relations_column
879
- IssueRelation.delete_all
880
- IssueRelation.create!(:relation_type => "relates", :issue_from => Issue.find(1), :issue_to => Issue.find(7))
881
- IssueRelation.create!(:relation_type => "relates", :issue_from => Issue.find(8), :issue_to => Issue.find(1))
882
- IssueRelation.create!(:relation_type => "blocks", :issue_from => Issue.find(1), :issue_to => Issue.find(11))
883
- IssueRelation.create!(:relation_type => "blocks", :issue_from => Issue.find(12), :issue_to => Issue.find(2))
884
-
885
- get :index, :set_filter => 1, :c => %w(subject relations)
886
- assert_response :success
887
- assert_select "tr#issue-1 td.relations" do
888
- assert_select "span", 3
889
- assert_select "span", :text => "Related to #7"
890
- assert_select "span", :text => "Related to #8"
891
- assert_select "span", :text => "Blocks #11"
892
- end
893
- assert_select "tr#issue-2 td.relations" do
894
- assert_select "span", 1
895
- assert_select "span", :text => "Blocked by #12"
896
- end
897
- assert_select "tr#issue-3 td.relations" do
898
- assert_select "span", 0
899
- end
900
-
901
- get :index, :set_filter => 1, :c => %w(relations), :format => 'csv'
902
- assert_response :success
903
- assert_equal 'text/csv; header=present', response.content_type
904
- lines = response.body.chomp.split("\n")
905
- assert_include '1,"Related to #7, Related to #8, Blocks #11"', lines
906
- assert_include '2,Blocked by #12', lines
907
- assert_include '3,""', lines
908
-
909
- get :index, :set_filter => 1, :c => %w(subject relations), :format => 'pdf'
910
- assert_response :success
911
- assert_equal 'application/pdf', response.content_type
912
- end
913
-
914
- def test_index_with_description_column
915
- get :index, :set_filter => 1, :c => %w(subject description)
916
-
917
- assert_select 'table.issues thead th', 3 # columns: chekbox + id + subject
918
- assert_select 'td.description[colspan="3"]', :text => 'Unable to print recipes'
919
-
920
- get :index, :set_filter => 1, :c => %w(subject description), :format => 'pdf'
921
- assert_response :success
922
- assert_equal 'application/pdf', response.content_type
923
- end
924
-
925
- def test_index_with_parent_column
926
- Issue.delete_all
927
- parent = Issue.generate!
928
- child = Issue.generate!(:parent_issue_id => parent.id)
929
-
930
- get :index, :c => %w(parent)
931
-
932
- assert_select 'td.parent', :text => "#{parent.tracker} ##{parent.id}"
933
- assert_select 'td.parent a[title=?]', parent.subject
934
- end
935
-
936
- def test_index_send_html_if_query_is_invalid
937
- get :index, :f => ['start_date'], :op => {:start_date => '='}
938
- assert_equal 'text/html', @response.content_type
939
- assert_template 'index'
940
- end
941
-
942
- def test_index_send_nothing_if_query_is_invalid
943
- get :index, :f => ['start_date'], :op => {:start_date => '='}, :format => 'csv'
944
- assert_equal 'text/csv', @response.content_type
945
- assert @response.body.blank?
946
- end
947
-
948
- def test_show_by_anonymous
949
- get :show, :id => 1
950
- assert_response :success
951
- assert_template 'show'
952
- assert_equal Issue.find(1), assigns(:issue)
953
- assert_select 'div.issue div.description', :text => /Unable to print recipes/
954
- # anonymous role is allowed to add a note
955
- assert_select 'form#issue-form' do
956
- assert_select 'fieldset' do
957
- assert_select 'legend', :text => 'Notes'
958
- assert_select 'textarea[name=?]', 'issue[notes]'
959
- end
960
- end
961
- assert_select 'title', :text => "Bug #1: Cannot print recipes - eCookbook - Redmine"
962
- end
963
-
964
- def test_show_by_manager
965
- @request.session[:user_id] = 2
966
- get :show, :id => 1
967
- assert_response :success
968
- assert_select 'a', :text => /Quote/
969
- assert_select 'form#issue-form' do
970
- assert_select 'fieldset' do
971
- assert_select 'legend', :text => 'Change properties'
972
- assert_select 'input[name=?]', 'issue[subject]'
973
- end
974
- assert_select 'fieldset' do
975
- assert_select 'legend', :text => 'Log time'
976
- assert_select 'input[name=?]', 'time_entry[hours]'
977
- end
978
- assert_select 'fieldset' do
979
- assert_select 'legend', :text => 'Notes'
980
- assert_select 'textarea[name=?]', 'issue[notes]'
981
- end
982
- end
983
- end
984
-
985
- def test_show_should_display_update_form
986
- @request.session[:user_id] = 2
987
- get :show, :id => 1
988
- assert_response :success
989
-
990
- assert_select 'form#issue-form' do
991
- assert_select 'input[name=?]', 'issue[is_private]'
992
- assert_select 'select[name=?]', 'issue[project_id]'
993
- assert_select 'select[name=?]', 'issue[tracker_id]'
994
- assert_select 'input[name=?]', 'issue[subject]'
995
- assert_select 'textarea[name=?]', 'issue[description]'
996
- assert_select 'select[name=?]', 'issue[status_id]'
997
- assert_select 'select[name=?]', 'issue[priority_id]'
998
- assert_select 'select[name=?]', 'issue[assigned_to_id]'
999
- assert_select 'select[name=?]', 'issue[category_id]'
1000
- assert_select 'select[name=?]', 'issue[fixed_version_id]'
1001
- assert_select 'input[name=?]', 'issue[parent_issue_id]'
1002
- assert_select 'input[name=?]', 'issue[start_date]'
1003
- assert_select 'input[name=?]', 'issue[due_date]'
1004
- assert_select 'select[name=?]', 'issue[done_ratio]'
1005
- assert_select 'input[name=?]', 'issue[custom_field_values][2]'
1006
- assert_select 'input[name=?]', 'issue[watcher_user_ids][]', 0
1007
- assert_select 'textarea[name=?]', 'issue[notes]'
1008
- end
1009
- end
1010
-
1011
- def test_show_should_display_update_form_with_minimal_permissions
1012
- Role.find(1).update_attribute :permissions, [:view_issues, :add_issue_notes]
1013
- WorkflowTransition.delete_all :role_id => 1
1014
-
1015
- @request.session[:user_id] = 2
1016
- get :show, :id => 1
1017
- assert_response :success
1018
-
1019
- assert_select 'form#issue-form' do
1020
- assert_select 'input[name=?]', 'issue[is_private]', 0
1021
- assert_select 'select[name=?]', 'issue[project_id]', 0
1022
- assert_select 'select[name=?]', 'issue[tracker_id]', 0
1023
- assert_select 'input[name=?]', 'issue[subject]', 0
1024
- assert_select 'textarea[name=?]', 'issue[description]', 0
1025
- assert_select 'select[name=?]', 'issue[status_id]', 0
1026
- assert_select 'select[name=?]', 'issue[priority_id]', 0
1027
- assert_select 'select[name=?]', 'issue[assigned_to_id]', 0
1028
- assert_select 'select[name=?]', 'issue[category_id]', 0
1029
- assert_select 'select[name=?]', 'issue[fixed_version_id]', 0
1030
- assert_select 'input[name=?]', 'issue[parent_issue_id]', 0
1031
- assert_select 'input[name=?]', 'issue[start_date]', 0
1032
- assert_select 'input[name=?]', 'issue[due_date]', 0
1033
- assert_select 'select[name=?]', 'issue[done_ratio]', 0
1034
- assert_select 'input[name=?]', 'issue[custom_field_values][2]', 0
1035
- assert_select 'input[name=?]', 'issue[watcher_user_ids][]', 0
1036
- assert_select 'textarea[name=?]', 'issue[notes]'
1037
- end
1038
- end
1039
-
1040
- def test_show_should_not_display_update_form_without_permissions
1041
- Role.find(1).update_attribute :permissions, [:view_issues]
1042
-
1043
- @request.session[:user_id] = 2
1044
- get :show, :id => 1
1045
- assert_response :success
1046
-
1047
- assert_select 'form#issue-form', 0
1048
- end
1049
-
1050
- def test_update_form_should_not_display_inactive_enumerations
1051
- assert !IssuePriority.find(15).active?
1052
-
1053
- @request.session[:user_id] = 2
1054
- get :show, :id => 1
1055
- assert_response :success
1056
-
1057
- assert_select 'form#issue-form' do
1058
- assert_select 'select[name=?]', 'issue[priority_id]' do
1059
- assert_select 'option[value="4"]'
1060
- assert_select 'option[value="15"]', 0
1061
- end
1062
- end
1063
- end
1064
-
1065
- def test_update_form_should_allow_attachment_upload
1066
- @request.session[:user_id] = 2
1067
- get :show, :id => 1
1068
-
1069
- assert_select 'form#issue-form[method=post][enctype="multipart/form-data"]' do
1070
- assert_select 'input[type=file][name=?]', 'attachments[dummy][file]'
1071
- end
1072
- end
1073
-
1074
- def test_show_should_deny_anonymous_access_without_permission
1075
- Role.anonymous.remove_permission!(:view_issues)
1076
- get :show, :id => 1
1077
- assert_response :redirect
1078
- end
1079
-
1080
- def test_show_should_deny_anonymous_access_to_private_issue
1081
- Issue.where(:id => 1).update_all(["is_private = ?", true])
1082
- get :show, :id => 1
1083
- assert_response :redirect
1084
- end
1085
-
1086
- def test_show_should_deny_non_member_access_without_permission
1087
- Role.non_member.remove_permission!(:view_issues)
1088
- @request.session[:user_id] = 9
1089
- get :show, :id => 1
1090
- assert_response 403
1091
- end
1092
-
1093
- def test_show_should_deny_non_member_access_to_private_issue
1094
- Issue.where(:id => 1).update_all(["is_private = ?", true])
1095
- @request.session[:user_id] = 9
1096
- get :show, :id => 1
1097
- assert_response 403
1098
- end
1099
-
1100
- def test_show_should_deny_member_access_without_permission
1101
- Role.find(1).remove_permission!(:view_issues)
1102
- @request.session[:user_id] = 2
1103
- get :show, :id => 1
1104
- assert_response 403
1105
- end
1106
-
1107
- def test_show_should_deny_member_access_to_private_issue_without_permission
1108
- Issue.where(:id => 1).update_all(["is_private = ?", true])
1109
- @request.session[:user_id] = 3
1110
- get :show, :id => 1
1111
- assert_response 403
1112
- end
1113
-
1114
- def test_show_should_allow_author_access_to_private_issue
1115
- Issue.where(:id => 1).update_all(["is_private = ?, author_id = 3", true])
1116
- @request.session[:user_id] = 3
1117
- get :show, :id => 1
1118
- assert_response :success
1119
- end
1120
-
1121
- def test_show_should_allow_assignee_access_to_private_issue
1122
- Issue.where(:id => 1).update_all(["is_private = ?, assigned_to_id = 3", true])
1123
- @request.session[:user_id] = 3
1124
- get :show, :id => 1
1125
- assert_response :success
1126
- end
1127
-
1128
- def test_show_should_allow_member_access_to_private_issue_with_permission
1129
- Issue.where(:id => 1).update_all(["is_private = ?", true])
1130
- User.find(3).roles_for_project(Project.find(1)).first.update_attribute :issues_visibility, 'all'
1131
- @request.session[:user_id] = 3
1132
- get :show, :id => 1
1133
- assert_response :success
1134
- end
1135
-
1136
- def test_show_should_not_disclose_relations_to_invisible_issues
1137
- Setting.cross_project_issue_relations = '1'
1138
- IssueRelation.create!(:issue_from => Issue.find(1), :issue_to => Issue.find(2), :relation_type => 'relates')
1139
- # Relation to a private project issue
1140
- IssueRelation.create!(:issue_from => Issue.find(1), :issue_to => Issue.find(4), :relation_type => 'relates')
1141
-
1142
- get :show, :id => 1
1143
- assert_response :success
1144
-
1145
- assert_select 'div#relations' do
1146
- assert_select 'a', :text => /#2$/
1147
- assert_select 'a', :text => /#4$/, :count => 0
1148
- end
1149
- end
1150
-
1151
- def test_show_should_list_subtasks
1152
- Issue.create!(:project_id => 1, :author_id => 1, :tracker_id => 1, :parent_issue_id => 1, :subject => 'Child Issue')
1153
-
1154
- get :show, :id => 1
1155
- assert_response :success
1156
-
1157
- assert_select 'div#issue_tree' do
1158
- assert_select 'td.subject', :text => /Child Issue/
1159
- end
1160
- end
1161
-
1162
- def test_show_should_list_parents
1163
- issue = Issue.create!(:project_id => 1, :author_id => 1, :tracker_id => 1, :parent_issue_id => 1, :subject => 'Child Issue')
1164
-
1165
- get :show, :id => issue.id
1166
- assert_response :success
1167
-
1168
- assert_select 'div.subject' do
1169
- assert_select 'h3', 'Child Issue'
1170
- assert_select 'a[href="/issues/1"]'
1171
- end
1172
- end
1173
-
1174
- def test_show_should_not_display_prev_next_links_without_query_in_session
1175
- get :show, :id => 1
1176
- assert_response :success
1177
- assert_nil assigns(:prev_issue_id)
1178
- assert_nil assigns(:next_issue_id)
1179
-
1180
- assert_select 'div.next-prev-links', 0
1181
- end
1182
-
1183
- def test_show_should_display_prev_next_links_with_query_in_session
1184
- @request.session[:query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => nil}
1185
- @request.session['issues_index_sort'] = 'id'
1186
-
1187
- with_settings :display_subprojects_issues => '0' do
1188
- get :show, :id => 3
1189
- end
1190
-
1191
- assert_response :success
1192
- # Previous and next issues for all projects
1193
- assert_equal 2, assigns(:prev_issue_id)
1194
- assert_equal 5, assigns(:next_issue_id)
1195
-
1196
- count = Issue.open.visible.count
1197
-
1198
- assert_select 'div.next-prev-links' do
1199
- assert_select 'a[href="/issues/2"]', :text => /Previous/
1200
- assert_select 'a[href="/issues/5"]', :text => /Next/
1201
- assert_select 'span.position', :text => "3 of #{count}"
1202
- end
1203
- end
1204
-
1205
- def test_show_should_display_prev_next_links_with_saved_query_in_session
1206
- query = IssueQuery.create!(:name => 'test', :visibility => IssueQuery::VISIBILITY_PUBLIC, :user_id => 1,
1207
- :filters => {'status_id' => {:values => ['5'], :operator => '='}},
1208
- :sort_criteria => [['id', 'asc']])
1209
- @request.session[:query] = {:id => query.id, :project_id => nil}
1210
-
1211
- get :show, :id => 11
1212
-
1213
- assert_response :success
1214
- assert_equal query, assigns(:query)
1215
- # Previous and next issues for all projects
1216
- assert_equal 8, assigns(:prev_issue_id)
1217
- assert_equal 12, assigns(:next_issue_id)
1218
-
1219
- assert_select 'div.next-prev-links' do
1220
- assert_select 'a[href="/issues/8"]', :text => /Previous/
1221
- assert_select 'a[href="/issues/12"]', :text => /Next/
1222
- end
1223
- end
1224
-
1225
- def test_show_should_display_prev_next_links_with_query_and_sort_on_association
1226
- @request.session[:query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => nil}
1227
-
1228
- %w(project tracker status priority author assigned_to category fixed_version).each do |assoc_sort|
1229
- @request.session['issues_index_sort'] = assoc_sort
1230
-
1231
- get :show, :id => 3
1232
- assert_response :success, "Wrong response status for #{assoc_sort} sort"
1233
-
1234
- assert_select 'div.next-prev-links' do
1235
- assert_select 'a', :text => /(Previous|Next)/
1236
- end
1237
- end
1238
- end
1239
-
1240
- def test_show_should_display_prev_next_links_with_project_query_in_session
1241
- @request.session[:query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => 1}
1242
- @request.session['issues_index_sort'] = 'id'
1243
-
1244
- with_settings :display_subprojects_issues => '0' do
1245
- get :show, :id => 3
1246
- end
1247
-
1248
- assert_response :success
1249
- # Previous and next issues inside project
1250
- assert_equal 2, assigns(:prev_issue_id)
1251
- assert_equal 7, assigns(:next_issue_id)
1252
-
1253
- assert_select 'div.next-prev-links' do
1254
- assert_select 'a[href="/issues/2"]', :text => /Previous/
1255
- assert_select 'a[href="/issues/7"]', :text => /Next/
1256
- end
1257
- end
1258
-
1259
- def test_show_should_not_display_prev_link_for_first_issue
1260
- @request.session[:query] = {:filters => {'status_id' => {:values => [''], :operator => 'o'}}, :project_id => 1}
1261
- @request.session['issues_index_sort'] = 'id'
1262
-
1263
- with_settings :display_subprojects_issues => '0' do
1264
- get :show, :id => 1
1265
- end
1266
-
1267
- assert_response :success
1268
- assert_nil assigns(:prev_issue_id)
1269
- assert_equal 2, assigns(:next_issue_id)
1270
-
1271
- assert_select 'div.next-prev-links' do
1272
- assert_select 'a', :text => /Previous/, :count => 0
1273
- assert_select 'a[href="/issues/2"]', :text => /Next/
1274
- end
1275
- end
1276
-
1277
- def test_show_should_not_display_prev_next_links_for_issue_not_in_query_results
1278
- @request.session[:query] = {:filters => {'status_id' => {:values => [''], :operator => 'c'}}, :project_id => 1}
1279
- @request.session['issues_index_sort'] = 'id'
1280
-
1281
- get :show, :id => 1
1282
-
1283
- assert_response :success
1284
- assert_nil assigns(:prev_issue_id)
1285
- assert_nil assigns(:next_issue_id)
1286
-
1287
- assert_select 'a', :text => /Previous/, :count => 0
1288
- assert_select 'a', :text => /Next/, :count => 0
1289
- end
1290
-
1291
- def test_show_show_should_display_prev_next_links_with_query_sort_by_user_custom_field
1292
- cf = IssueCustomField.create!(:name => 'User', :is_for_all => true, :tracker_ids => [1,2,3], :field_format => 'user')
1293
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(1), :value => '2')
1294
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(2), :value => '3')
1295
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(3), :value => '3')
1296
- CustomValue.create!(:custom_field => cf, :customized => Issue.find(5), :value => '')
1297
-
1298
- query = IssueQuery.create!(:name => 'test', :visibility => IssueQuery::VISIBILITY_PUBLIC, :user_id => 1, :filters => {},
1299
- :sort_criteria => [["cf_#{cf.id}", 'asc'], ['id', 'asc']])
1300
- @request.session[:query] = {:id => query.id, :project_id => nil}
1301
-
1302
- get :show, :id => 3
1303
- assert_response :success
1304
-
1305
- assert_equal 2, assigns(:prev_issue_id)
1306
- assert_equal 1, assigns(:next_issue_id)
1307
-
1308
- assert_select 'div.next-prev-links' do
1309
- assert_select 'a[href="/issues/2"]', :text => /Previous/
1310
- assert_select 'a[href="/issues/1"]', :text => /Next/
1311
- end
1312
- end
1313
-
1314
- def test_show_should_display_link_to_the_assignee
1315
- get :show, :id => 2
1316
- assert_response :success
1317
- assert_select '.assigned-to' do
1318
- assert_select 'a[href="/users/3"]'
1319
- end
1320
- end
1321
-
1322
- def test_show_should_display_visible_changesets_from_other_projects
1323
- project = Project.find(2)
1324
- issue = project.issues.first
1325
- issue.changeset_ids = [102]
1326
- issue.save!
1327
- # changesets from other projects should be displayed even if repository
1328
- # is disabled on issue's project
1329
- project.disable_module! :repository
1330
-
1331
- @request.session[:user_id] = 2
1332
- get :show, :id => issue.id
1333
-
1334
- assert_select 'a[href=?]', '/projects/ecookbook/repository/revisions/3'
1335
- end
1336
-
1337
- def test_show_should_display_watchers
1338
- @request.session[:user_id] = 2
1339
- Issue.find(1).add_watcher User.find(2)
1340
-
1341
- get :show, :id => 1
1342
- assert_select 'div#watchers ul' do
1343
- assert_select 'li' do
1344
- assert_select 'a[href="/users/2"]'
1345
- assert_select 'a img[alt=Delete]'
1346
- end
1347
- end
1348
- end
1349
-
1350
- def test_show_should_display_watchers_with_gravatars
1351
- @request.session[:user_id] = 2
1352
- Issue.find(1).add_watcher User.find(2)
1353
-
1354
- with_settings :gravatar_enabled => '1' do
1355
- get :show, :id => 1
1356
- end
1357
-
1358
- assert_select 'div#watchers ul' do
1359
- assert_select 'li' do
1360
- assert_select 'img.gravatar'
1361
- assert_select 'a[href="/users/2"]'
1362
- assert_select 'a img[alt=Delete]'
1363
- end
1364
- end
1365
- end
1366
-
1367
- def test_show_with_thumbnails_enabled_should_display_thumbnails
1368
- @request.session[:user_id] = 2
1369
-
1370
- with_settings :thumbnails_enabled => '1' do
1371
- get :show, :id => 14
1372
- assert_response :success
1373
- end
1374
-
1375
- assert_select 'div.thumbnails' do
1376
- assert_select 'a[href="/attachments/16/testfile.png"]' do
1377
- assert_select 'img[src="/attachments/thumbnail/16"]'
1378
- end
1379
- end
1380
- end
1381
-
1382
- def test_show_with_thumbnails_disabled_should_not_display_thumbnails
1383
- @request.session[:user_id] = 2
1384
-
1385
- with_settings :thumbnails_enabled => '0' do
1386
- get :show, :id => 14
1387
- assert_response :success
1388
- end
1389
-
1390
- assert_select 'div.thumbnails', 0
1391
- end
1392
-
1393
- def test_show_with_multi_custom_field
1394
- field = CustomField.find(1)
1395
- field.update_attribute :multiple, true
1396
- issue = Issue.find(1)
1397
- issue.custom_field_values = {1 => ['MySQL', 'Oracle']}
1398
- issue.save!
1399
-
1400
- get :show, :id => 1
1401
- assert_response :success
1402
-
1403
- assert_select 'td', :text => 'MySQL, Oracle'
1404
- end
1405
-
1406
- def test_show_with_multi_user_custom_field
1407
- field = IssueCustomField.create!(:name => 'Multi user', :field_format => 'user', :multiple => true,
1408
- :tracker_ids => [1], :is_for_all => true)
1409
- issue = Issue.find(1)
1410
- issue.custom_field_values = {field.id => ['2', '3']}
1411
- issue.save!
1412
-
1413
- get :show, :id => 1
1414
- assert_response :success
1415
-
1416
- assert_select "td.cf_#{field.id}", :text => 'Dave Lopper, John Smith' do
1417
- assert_select 'a', :text => 'Dave Lopper'
1418
- assert_select 'a', :text => 'John Smith'
1419
- end
1420
- end
1421
-
1422
- def test_show_should_display_private_notes_with_permission_only
1423
- journal = Journal.create!(:journalized => Issue.find(2), :notes => 'Privates notes', :private_notes => true, :user_id => 1)
1424
- @request.session[:user_id] = 2
1425
-
1426
- get :show, :id => 2
1427
- assert_response :success
1428
- assert_include journal, assigns(:journals)
1429
-
1430
- Role.find(1).remove_permission! :view_private_notes
1431
- get :show, :id => 2
1432
- assert_response :success
1433
- assert_not_include journal, assigns(:journals)
1434
- end
1435
-
1436
- def test_show_atom
1437
- get :show, :id => 2, :format => 'atom'
1438
- assert_response :success
1439
- assert_template 'journals/index'
1440
- # Inline image
1441
- assert_select 'content', :text => Regexp.new(Regexp.quote('http://test.host/attachments/download/10'))
1442
- end
1443
-
1444
- def test_show_export_to_pdf
1445
- issue = Issue.find(3)
1446
- assert issue.relations.select{|r| r.other_issue(issue).visible?}.present?
1447
- get :show, :id => 3, :format => 'pdf'
1448
- assert_response :success
1449
- assert_equal 'application/pdf', @response.content_type
1450
- assert @response.body.starts_with?('%PDF')
1451
- assert_not_nil assigns(:issue)
1452
- end
1453
-
1454
- def test_export_to_pdf_with_utf8_u_fffd
1455
- # U+FFFD
1456
- s = "\xef\xbf\xbd"
1457
- s.force_encoding('UTF-8') if s.respond_to?(:force_encoding)
1458
- issue = Issue.generate!(:subject => s)
1459
- ["en", "zh", "zh-TW", "ja", "ko"].each do |lang|
1460
- with_settings :default_language => lang do
1461
- get :show, :id => issue.id, :format => 'pdf'
1462
- assert_response :success
1463
- assert_equal 'application/pdf', @response.content_type
1464
- assert @response.body.starts_with?('%PDF')
1465
- assert_not_nil assigns(:issue)
1466
- end
1467
- end
1468
- end
1469
-
1470
- def test_show_export_to_pdf_with_ancestors
1471
- issue = Issue.generate!(:project_id => 1, :author_id => 2, :tracker_id => 1, :subject => 'child', :parent_issue_id => 1)
1472
-
1473
- get :show, :id => issue.id, :format => 'pdf'
1474
- assert_response :success
1475
- assert_equal 'application/pdf', @response.content_type
1476
- assert @response.body.starts_with?('%PDF')
1477
- end
1478
-
1479
- def test_show_export_to_pdf_with_descendants
1480
- c1 = Issue.generate!(:project_id => 1, :author_id => 2, :tracker_id => 1, :subject => 'child', :parent_issue_id => 1)
1481
- c2 = Issue.generate!(:project_id => 1, :author_id => 2, :tracker_id => 1, :subject => 'child', :parent_issue_id => 1)
1482
- c3 = Issue.generate!(:project_id => 1, :author_id => 2, :tracker_id => 1, :subject => 'child', :parent_issue_id => c1.id)
1483
-
1484
- get :show, :id => 1, :format => 'pdf'
1485
- assert_response :success
1486
- assert_equal 'application/pdf', @response.content_type
1487
- assert @response.body.starts_with?('%PDF')
1488
- end
1489
-
1490
- def test_show_export_to_pdf_with_journals
1491
- get :show, :id => 1, :format => 'pdf'
1492
- assert_response :success
1493
- assert_equal 'application/pdf', @response.content_type
1494
- assert @response.body.starts_with?('%PDF')
1495
- end
1496
-
1497
- def test_show_export_to_pdf_with_changesets
1498
- [[100], [100, 101], [100, 101, 102]].each do |cs|
1499
- issue1 = Issue.find(3)
1500
- issue1.changesets = Changeset.find(cs)
1501
- issue1.save!
1502
- issue = Issue.find(3)
1503
- assert_equal issue.changesets.count, cs.size
1504
- get :show, :id => 3, :format => 'pdf'
1505
- assert_response :success
1506
- assert_equal 'application/pdf', @response.content_type
1507
- assert @response.body.starts_with?('%PDF')
1508
- end
1509
- end
1510
-
1511
- def test_show_invalid_should_respond_with_404
1512
- get :show, :id => 999
1513
- assert_response 404
1514
- end
1515
-
1516
- def test_get_new
1517
- @request.session[:user_id] = 2
1518
- get :new, :project_id => 1, :tracker_id => 1
1519
- assert_response :success
1520
- assert_template 'new'
1521
-
1522
- assert_select 'form#issue-form[action=?]', '/projects/ecookbook/issues'
1523
- assert_select 'form#issue-form' do
1524
- assert_select 'input[name=?]', 'issue[is_private]'
1525
- assert_select 'select[name=?]', 'issue[project_id]', 0
1526
- assert_select 'select[name=?]', 'issue[tracker_id]'
1527
- assert_select 'input[name=?]', 'issue[subject]'
1528
- assert_select 'textarea[name=?]', 'issue[description]'
1529
- assert_select 'select[name=?]', 'issue[status_id]'
1530
- assert_select 'select[name=?]', 'issue[priority_id]'
1531
- assert_select 'select[name=?]', 'issue[assigned_to_id]'
1532
- assert_select 'select[name=?]', 'issue[category_id]'
1533
- assert_select 'select[name=?]', 'issue[fixed_version_id]'
1534
- assert_select 'input[name=?]', 'issue[parent_issue_id]'
1535
- assert_select 'input[name=?]', 'issue[start_date]'
1536
- assert_select 'input[name=?]', 'issue[due_date]'
1537
- assert_select 'select[name=?]', 'issue[done_ratio]'
1538
- assert_select 'input[name=?][value=?]', 'issue[custom_field_values][2]', 'Default string'
1539
- assert_select 'input[name=?]', 'issue[watcher_user_ids][]'
1540
- end
1541
-
1542
- # Be sure we don't display inactive IssuePriorities
1543
- assert ! IssuePriority.find(15).active?
1544
- assert_select 'select[name=?]', 'issue[priority_id]' do
1545
- assert_select 'option[value="15"]', 0
1546
- end
1547
- end
1548
-
1549
- def test_get_new_with_minimal_permissions
1550
- Role.find(1).update_attribute :permissions, [:add_issues]
1551
- WorkflowTransition.delete_all :role_id => 1
1552
-
1553
- @request.session[:user_id] = 2
1554
- get :new, :project_id => 1, :tracker_id => 1
1555
- assert_response :success
1556
- assert_template 'new'
1557
-
1558
- assert_select 'form#issue-form' do
1559
- assert_select 'input[name=?]', 'issue[is_private]', 0
1560
- assert_select 'select[name=?]', 'issue[project_id]', 0
1561
- assert_select 'select[name=?]', 'issue[tracker_id]'
1562
- assert_select 'input[name=?]', 'issue[subject]'
1563
- assert_select 'textarea[name=?]', 'issue[description]'
1564
- assert_select 'select[name=?]', 'issue[status_id]'
1565
- assert_select 'select[name=?]', 'issue[priority_id]'
1566
- assert_select 'select[name=?]', 'issue[assigned_to_id]'
1567
- assert_select 'select[name=?]', 'issue[category_id]'
1568
- assert_select 'select[name=?]', 'issue[fixed_version_id]'
1569
- assert_select 'input[name=?]', 'issue[parent_issue_id]', 0
1570
- assert_select 'input[name=?]', 'issue[start_date]'
1571
- assert_select 'input[name=?]', 'issue[due_date]'
1572
- assert_select 'select[name=?]', 'issue[done_ratio]'
1573
- assert_select 'input[name=?][value=?]', 'issue[custom_field_values][2]', 'Default string'
1574
- assert_select 'input[name=?]', 'issue[watcher_user_ids][]', 0
1575
- end
1576
- end
1577
-
1578
- def test_new_without_project_id
1579
- @request.session[:user_id] = 2
1580
- get :new
1581
- assert_response :success
1582
- assert_template 'new'
1583
-
1584
- assert_select 'form#issue-form[action=?]', '/issues'
1585
- assert_select 'form#issue-form' do
1586
- assert_select 'select[name=?]', 'issue[project_id]'
1587
- end
1588
-
1589
- assert_nil assigns(:project)
1590
- assert_not_nil assigns(:issue)
1591
- end
1592
-
1593
- def test_new_should_select_default_status
1594
- @request.session[:user_id] = 2
1595
-
1596
- get :new, :project_id => 1
1597
- assert_response :success
1598
- assert_template 'new'
1599
- assert_select 'select[name=?]', 'issue[status_id]' do
1600
- assert_select 'option[value="1"][selected=selected]'
1601
- end
1602
- assert_select 'input[name=was_default_status][value="1"]'
1603
- end
1604
-
1605
- def test_get_new_with_list_custom_field
1606
- @request.session[:user_id] = 2
1607
- get :new, :project_id => 1, :tracker_id => 1
1608
- assert_response :success
1609
- assert_template 'new'
1610
-
1611
- assert_select 'select.list_cf[name=?]', 'issue[custom_field_values][1]' do
1612
- assert_select 'option', 4
1613
- assert_select 'option[value=MySQL]', :text => 'MySQL'
1614
- end
1615
- end
1616
-
1617
- def test_get_new_with_multi_custom_field
1618
- field = IssueCustomField.find(1)
1619
- field.update_attribute :multiple, true
1620
-
1621
- @request.session[:user_id] = 2
1622
- get :new, :project_id => 1, :tracker_id => 1
1623
- assert_response :success
1624
- assert_template 'new'
1625
-
1626
- assert_select 'select[name=?][multiple=multiple]', 'issue[custom_field_values][1][]' do
1627
- assert_select 'option', 3
1628
- assert_select 'option[value=MySQL]', :text => 'MySQL'
1629
- end
1630
- assert_select 'input[name=?][type=hidden][value=?]', 'issue[custom_field_values][1][]', ''
1631
- end
1632
-
1633
- def test_get_new_with_multi_user_custom_field
1634
- field = IssueCustomField.create!(:name => 'Multi user', :field_format => 'user', :multiple => true,
1635
- :tracker_ids => [1], :is_for_all => true)
1636
-
1637
- @request.session[:user_id] = 2
1638
- get :new, :project_id => 1, :tracker_id => 1
1639
- assert_response :success
1640
- assert_template 'new'
1641
-
1642
- assert_select 'select[name=?][multiple=multiple]', "issue[custom_field_values][#{field.id}][]" do
1643
- assert_select 'option', Project.find(1).users.count
1644
- assert_select 'option[value="2"]', :text => 'John Smith'
1645
- end
1646
- assert_select 'input[name=?][type=hidden][value=?]', "issue[custom_field_values][#{field.id}][]", ''
1647
- end
1648
-
1649
- def test_get_new_with_date_custom_field
1650
- field = IssueCustomField.create!(:name => 'Date', :field_format => 'date', :tracker_ids => [1], :is_for_all => true)
1651
-
1652
- @request.session[:user_id] = 2
1653
- get :new, :project_id => 1, :tracker_id => 1
1654
- assert_response :success
1655
-
1656
- assert_select 'input[name=?]', "issue[custom_field_values][#{field.id}]"
1657
- end
1658
-
1659
- def test_get_new_with_text_custom_field
1660
- field = IssueCustomField.create!(:name => 'Text', :field_format => 'text', :tracker_ids => [1], :is_for_all => true)
1661
-
1662
- @request.session[:user_id] = 2
1663
- get :new, :project_id => 1, :tracker_id => 1
1664
- assert_response :success
1665
-
1666
- assert_select 'textarea[name=?]', "issue[custom_field_values][#{field.id}]"
1667
- end
1668
-
1669
- def test_get_new_without_default_start_date_is_creation_date
1670
- with_settings :default_issue_start_date_to_creation_date => 0 do
1671
- @request.session[:user_id] = 2
1672
- get :new, :project_id => 1, :tracker_id => 1
1673
- assert_response :success
1674
- assert_template 'new'
1675
- assert_select 'input[name=?]', 'issue[start_date]'
1676
- assert_select 'input[name=?][value]', 'issue[start_date]', 0
1677
- end
1678
- end
1679
-
1680
- def test_get_new_with_default_start_date_is_creation_date
1681
- with_settings :default_issue_start_date_to_creation_date => 1 do
1682
- @request.session[:user_id] = 2
1683
- get :new, :project_id => 1, :tracker_id => 1
1684
- assert_response :success
1685
- assert_template 'new'
1686
- assert_select 'input[name=?][value=?]', 'issue[start_date]',
1687
- Date.today.to_s
1688
- end
1689
- end
1690
-
1691
- def test_get_new_form_should_allow_attachment_upload
1692
- @request.session[:user_id] = 2
1693
- get :new, :project_id => 1, :tracker_id => 1
1694
-
1695
- assert_select 'form[id=issue-form][method=post][enctype="multipart/form-data"]' do
1696
- assert_select 'input[name=?][type=file]', 'attachments[dummy][file]'
1697
- end
1698
- end
1699
-
1700
- def test_get_new_should_prefill_the_form_from_params
1701
- @request.session[:user_id] = 2
1702
- get :new, :project_id => 1,
1703
- :issue => {:tracker_id => 3, :description => 'Prefilled', :custom_field_values => {'2' => 'Custom field value'}}
1704
-
1705
- issue = assigns(:issue)
1706
- assert_equal 3, issue.tracker_id
1707
- assert_equal 'Prefilled', issue.description
1708
- assert_equal 'Custom field value', issue.custom_field_value(2)
1709
-
1710
- assert_select 'select[name=?]', 'issue[tracker_id]' do
1711
- assert_select 'option[value="3"][selected=selected]'
1712
- end
1713
- assert_select 'textarea[name=?]', 'issue[description]', :text => /Prefilled/
1714
- assert_select 'input[name=?][value=?]', 'issue[custom_field_values][2]', 'Custom field value'
1715
- end
1716
-
1717
- def test_get_new_should_mark_required_fields
1718
- cf1 = IssueCustomField.create!(:name => 'Foo', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2])
1719
- cf2 = IssueCustomField.create!(:name => 'Bar', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2])
1720
- WorkflowPermission.delete_all
1721
- WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'required')
1722
- WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => cf2.id.to_s, :rule => 'required')
1723
- @request.session[:user_id] = 2
1724
-
1725
- get :new, :project_id => 1
1726
- assert_response :success
1727
- assert_template 'new'
1728
-
1729
- assert_select 'label[for=issue_start_date]' do
1730
- assert_select 'span[class=required]', 0
1731
- end
1732
- assert_select 'label[for=issue_due_date]' do
1733
- assert_select 'span[class=required]'
1734
- end
1735
- assert_select 'label[for=?]', "issue_custom_field_values_#{cf1.id}" do
1736
- assert_select 'span[class=required]', 0
1737
- end
1738
- assert_select 'label[for=?]', "issue_custom_field_values_#{cf2.id}" do
1739
- assert_select 'span[class=required]'
1740
- end
1741
- end
1742
-
1743
- def test_get_new_should_not_display_readonly_fields
1744
- cf1 = IssueCustomField.create!(:name => 'Foo', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2])
1745
- cf2 = IssueCustomField.create!(:name => 'Bar', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2])
1746
- WorkflowPermission.delete_all
1747
- WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => 'due_date', :rule => 'readonly')
1748
- WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 1, :role_id => 1, :field_name => cf2.id.to_s, :rule => 'readonly')
1749
- @request.session[:user_id] = 2
1750
-
1751
- get :new, :project_id => 1
1752
- assert_response :success
1753
- assert_template 'new'
1754
-
1755
- assert_select 'input[name=?]', 'issue[start_date]'
1756
- assert_select 'input[name=?]', 'issue[due_date]', 0
1757
- assert_select 'input[name=?]', "issue[custom_field_values][#{cf1.id}]"
1758
- assert_select 'input[name=?]', "issue[custom_field_values][#{cf2.id}]", 0
1759
- end
1760
-
1761
- def test_new_with_tracker_set_as_readonly_should_accept_status
1762
- WorkflowPermission.delete_all
1763
- [1, 2].each do |status_id|
1764
- WorkflowPermission.create!(:tracker_id => 1, :old_status_id => status_id, :role_id => 1, :field_name => 'tracker_id', :rule => 'readonly')
1765
- end
1766
- @request.session[:user_id] = 2
1767
-
1768
- get :new, :project_id => 1, :issue => {:status_id => 2}
1769
- assert_select 'select[name=?]', 'issue[tracker_id]', 0
1770
- assert_equal 2, assigns(:issue).status_id
1771
- end
1772
-
1773
- def test_get_new_without_tracker_id
1774
- @request.session[:user_id] = 2
1775
- get :new, :project_id => 1
1776
- assert_response :success
1777
- assert_template 'new'
1778
-
1779
- issue = assigns(:issue)
1780
- assert_not_nil issue
1781
- assert_equal Project.find(1).trackers.first, issue.tracker
1782
- end
1783
-
1784
- def test_get_new_with_no_default_status_should_display_an_error
1785
- @request.session[:user_id] = 2
1786
- IssueStatus.delete_all
1787
-
1788
- get :new, :project_id => 1
1789
- assert_response 500
1790
- assert_select_error /No default issue/
1791
- end
1792
-
1793
- def test_get_new_with_no_tracker_should_display_an_error
1794
- @request.session[:user_id] = 2
1795
- Tracker.delete_all
1796
-
1797
- get :new, :project_id => 1
1798
- assert_response 500
1799
- assert_select_error /No tracker/
1800
- end
1801
-
1802
- def test_new_with_invalid_project_id
1803
- @request.session[:user_id] = 1
1804
- get :new, :project_id => 'invalid'
1805
- assert_response 404
1806
- end
1807
-
1808
- def test_update_form_for_new_issue
1809
- @request.session[:user_id] = 2
1810
- xhr :post, :new, :project_id => 1,
1811
- :issue => {:tracker_id => 2,
1812
- :subject => 'This is the test_new issue',
1813
- :description => 'This is the description',
1814
- :priority_id => 5}
1815
- assert_response :success
1816
- assert_template 'new'
1817
- assert_template :partial => '_form'
1818
- assert_equal 'text/javascript', response.content_type
1819
-
1820
- issue = assigns(:issue)
1821
- assert_kind_of Issue, issue
1822
- assert_equal 1, issue.project_id
1823
- assert_equal 2, issue.tracker_id
1824
- assert_equal 'This is the test_new issue', issue.subject
1825
- end
1826
-
1827
- def test_update_form_for_new_issue_should_propose_transitions_based_on_initial_status
1828
- @request.session[:user_id] = 2
1829
- WorkflowTransition.delete_all
1830
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 2)
1831
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 1, :new_status_id => 5)
1832
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 1, :old_status_id => 5, :new_status_id => 4)
1833
-
1834
- xhr :post, :new, :project_id => 1,
1835
- :issue => {:tracker_id => 1,
1836
- :status_id => 5,
1837
- :subject => 'This is an issue'}
1838
-
1839
- assert_equal 5, assigns(:issue).status_id
1840
- assert_equal [1,2,5], assigns(:allowed_statuses).map(&:id).sort
1841
- end
1842
-
1843
- def test_update_form_with_default_status_should_ignore_submitted_status_id_if_equals
1844
- @request.session[:user_id] = 2
1845
- tracker = Tracker.find(2)
1846
- tracker.update! :default_status_id => 2
1847
- tracker.generate_transitions! 2, 1, :clear => true
1848
-
1849
- xhr :post, :new, :project_id => 1,
1850
- :issue => {:tracker_id => 2,
1851
- :status_id => 1},
1852
- :was_default_status => 1
1853
-
1854
- assert_equal 2, assigns(:issue).status_id
1855
- end
1856
-
1857
- def test_post_create
1858
- @request.session[:user_id] = 2
1859
- assert_difference 'Issue.count' do
1860
- assert_no_difference 'Journal.count' do
1861
- post :create, :project_id => 1,
1862
- :issue => {:tracker_id => 3,
1863
- :status_id => 2,
1864
- :subject => 'This is the test_new issue',
1865
- :description => 'This is the description',
1866
- :priority_id => 5,
1867
- :start_date => '2010-11-07',
1868
- :estimated_hours => '',
1869
- :custom_field_values => {'2' => 'Value for field 2'}}
1870
- end
1871
- end
1872
- assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
1873
-
1874
- issue = Issue.find_by_subject('This is the test_new issue')
1875
- assert_not_nil issue
1876
- assert_equal 2, issue.author_id
1877
- assert_equal 3, issue.tracker_id
1878
- assert_equal 2, issue.status_id
1879
- assert_equal Date.parse('2010-11-07'), issue.start_date
1880
- assert_nil issue.estimated_hours
1881
- v = issue.custom_values.where(:custom_field_id => 2).first
1882
- assert_not_nil v
1883
- assert_equal 'Value for field 2', v.value
1884
- end
1885
-
1886
- def test_post_new_with_group_assignment
1887
- group = Group.find(11)
1888
- project = Project.find(1)
1889
- project.members << Member.new(:principal => group, :roles => [Role.givable.first])
1890
-
1891
- with_settings :issue_group_assignment => '1' do
1892
- @request.session[:user_id] = 2
1893
- assert_difference 'Issue.count' do
1894
- post :create, :project_id => project.id,
1895
- :issue => {:tracker_id => 3,
1896
- :status_id => 1,
1897
- :subject => 'This is the test_new_with_group_assignment issue',
1898
- :assigned_to_id => group.id}
1899
- end
1900
- end
1901
- assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
1902
-
1903
- issue = Issue.find_by_subject('This is the test_new_with_group_assignment issue')
1904
- assert_not_nil issue
1905
- assert_equal group, issue.assigned_to
1906
- end
1907
-
1908
- def test_post_create_without_start_date_and_default_start_date_is_not_creation_date
1909
- with_settings :default_issue_start_date_to_creation_date => 0 do
1910
- @request.session[:user_id] = 2
1911
- assert_difference 'Issue.count' do
1912
- post :create, :project_id => 1,
1913
- :issue => {:tracker_id => 3,
1914
- :status_id => 2,
1915
- :subject => 'This is the test_new issue',
1916
- :description => 'This is the description',
1917
- :priority_id => 5,
1918
- :estimated_hours => '',
1919
- :custom_field_values => {'2' => 'Value for field 2'}}
1920
- end
1921
- assert_redirected_to :controller => 'issues', :action => 'show',
1922
- :id => Issue.last.id
1923
- issue = Issue.find_by_subject('This is the test_new issue')
1924
- assert_not_nil issue
1925
- assert_nil issue.start_date
1926
- end
1927
- end
1928
-
1929
- def test_post_create_without_start_date_and_default_start_date_is_creation_date
1930
- with_settings :default_issue_start_date_to_creation_date => 1 do
1931
- @request.session[:user_id] = 2
1932
- assert_difference 'Issue.count' do
1933
- post :create, :project_id => 1,
1934
- :issue => {:tracker_id => 3,
1935
- :status_id => 2,
1936
- :subject => 'This is the test_new issue',
1937
- :description => 'This is the description',
1938
- :priority_id => 5,
1939
- :estimated_hours => '',
1940
- :custom_field_values => {'2' => 'Value for field 2'}}
1941
- end
1942
- assert_redirected_to :controller => 'issues', :action => 'show',
1943
- :id => Issue.last.id
1944
- issue = Issue.find_by_subject('This is the test_new issue')
1945
- assert_not_nil issue
1946
- assert_equal Date.today, issue.start_date
1947
- end
1948
- end
1949
-
1950
- def test_post_create_and_continue
1951
- @request.session[:user_id] = 2
1952
- assert_difference 'Issue.count' do
1953
- post :create, :project_id => 1,
1954
- :issue => {:tracker_id => 3, :subject => 'This is first issue', :priority_id => 5},
1955
- :continue => ''
1956
- end
1957
-
1958
- issue = Issue.order('id DESC').first
1959
- assert_redirected_to :controller => 'issues', :action => 'new', :project_id => 'ecookbook', :issue => {:tracker_id => 3}
1960
- assert_not_nil flash[:notice], "flash was not set"
1961
- assert_select_in flash[:notice],
1962
- 'a[href=?][title=?]', "/issues/#{issue.id}", "This is first issue", :text => "##{issue.id}"
1963
- end
1964
-
1965
- def test_post_create_without_custom_fields_param
1966
- @request.session[:user_id] = 2
1967
- assert_difference 'Issue.count' do
1968
- post :create, :project_id => 1,
1969
- :issue => {:tracker_id => 1,
1970
- :subject => 'This is the test_new issue',
1971
- :description => 'This is the description',
1972
- :priority_id => 5}
1973
- end
1974
- assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
1975
- end
1976
-
1977
- def test_post_create_with_multi_custom_field
1978
- field = IssueCustomField.find_by_name('Database')
1979
- field.update_attribute(:multiple, true)
1980
-
1981
- @request.session[:user_id] = 2
1982
- assert_difference 'Issue.count' do
1983
- post :create, :project_id => 1,
1984
- :issue => {:tracker_id => 1,
1985
- :subject => 'This is the test_new issue',
1986
- :description => 'This is the description',
1987
- :priority_id => 5,
1988
- :custom_field_values => {'1' => ['', 'MySQL', 'Oracle']}}
1989
- end
1990
- assert_response 302
1991
- issue = Issue.order('id DESC').first
1992
- assert_equal ['MySQL', 'Oracle'], issue.custom_field_value(1).sort
1993
- end
1994
-
1995
- def test_post_create_with_empty_multi_custom_field
1996
- field = IssueCustomField.find_by_name('Database')
1997
- field.update_attribute(:multiple, true)
1998
-
1999
- @request.session[:user_id] = 2
2000
- assert_difference 'Issue.count' do
2001
- post :create, :project_id => 1,
2002
- :issue => {:tracker_id => 1,
2003
- :subject => 'This is the test_new issue',
2004
- :description => 'This is the description',
2005
- :priority_id => 5,
2006
- :custom_field_values => {'1' => ['']}}
2007
- end
2008
- assert_response 302
2009
- issue = Issue.order('id DESC').first
2010
- assert_equal [''], issue.custom_field_value(1).sort
2011
- end
2012
-
2013
- def test_post_create_with_multi_user_custom_field
2014
- field = IssueCustomField.create!(:name => 'Multi user', :field_format => 'user', :multiple => true,
2015
- :tracker_ids => [1], :is_for_all => true)
2016
-
2017
- @request.session[:user_id] = 2
2018
- assert_difference 'Issue.count' do
2019
- post :create, :project_id => 1,
2020
- :issue => {:tracker_id => 1,
2021
- :subject => 'This is the test_new issue',
2022
- :description => 'This is the description',
2023
- :priority_id => 5,
2024
- :custom_field_values => {field.id.to_s => ['', '2', '3']}}
2025
- end
2026
- assert_response 302
2027
- issue = Issue.order('id DESC').first
2028
- assert_equal ['2', '3'], issue.custom_field_value(field).sort
2029
- end
2030
-
2031
- def test_post_create_with_required_custom_field_and_without_custom_fields_param
2032
- field = IssueCustomField.find_by_name('Database')
2033
- field.update_attribute(:is_required, true)
2034
-
2035
- @request.session[:user_id] = 2
2036
- assert_no_difference 'Issue.count' do
2037
- post :create, :project_id => 1,
2038
- :issue => {:tracker_id => 1,
2039
- :subject => 'This is the test_new issue',
2040
- :description => 'This is the description',
2041
- :priority_id => 5}
2042
- end
2043
- assert_response :success
2044
- assert_template 'new'
2045
- issue = assigns(:issue)
2046
- assert_not_nil issue
2047
- assert_select_error /Database cannot be blank/
2048
- end
2049
-
2050
- def test_create_should_validate_required_fields
2051
- cf1 = IssueCustomField.create!(:name => 'Foo', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2])
2052
- cf2 = IssueCustomField.create!(:name => 'Bar', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2])
2053
- WorkflowPermission.delete_all
2054
- WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => 'due_date', :rule => 'required')
2055
- WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => cf2.id.to_s, :rule => 'required')
2056
- @request.session[:user_id] = 2
2057
-
2058
- assert_no_difference 'Issue.count' do
2059
- post :create, :project_id => 1, :issue => {
2060
- :tracker_id => 2,
2061
- :status_id => 1,
2062
- :subject => 'Test',
2063
- :start_date => '',
2064
- :due_date => '',
2065
- :custom_field_values => {cf1.id.to_s => '', cf2.id.to_s => ''}
2066
- }
2067
- assert_response :success
2068
- assert_template 'new'
2069
- end
2070
-
2071
- assert_select_error /Due date cannot be blank/i
2072
- assert_select_error /Bar cannot be blank/i
2073
- end
2074
-
2075
- def test_create_should_ignore_readonly_fields
2076
- cf1 = IssueCustomField.create!(:name => 'Foo', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2])
2077
- cf2 = IssueCustomField.create!(:name => 'Bar', :field_format => 'string', :is_for_all => true, :tracker_ids => [1, 2])
2078
- WorkflowPermission.delete_all
2079
- WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => 'due_date', :rule => 'readonly')
2080
- WorkflowPermission.create!(:old_status_id => 1, :tracker_id => 2, :role_id => 1, :field_name => cf2.id.to_s, :rule => 'readonly')
2081
- @request.session[:user_id] = 2
2082
-
2083
- assert_difference 'Issue.count' do
2084
- post :create, :project_id => 1, :issue => {
2085
- :tracker_id => 2,
2086
- :status_id => 1,
2087
- :subject => 'Test',
2088
- :start_date => '2012-07-14',
2089
- :due_date => '2012-07-16',
2090
- :custom_field_values => {cf1.id.to_s => 'value1', cf2.id.to_s => 'value2'}
2091
- }
2092
- assert_response 302
2093
- end
2094
-
2095
- issue = Issue.order('id DESC').first
2096
- assert_equal Date.parse('2012-07-14'), issue.start_date
2097
- assert_nil issue.due_date
2098
- assert_equal 'value1', issue.custom_field_value(cf1)
2099
- assert_nil issue.custom_field_value(cf2)
2100
- end
2101
-
2102
- def test_post_create_with_watchers
2103
- @request.session[:user_id] = 2
2104
- ActionMailer::Base.deliveries.clear
2105
-
2106
- with_settings :notified_events => %w(issue_added) do
2107
- assert_difference 'Watcher.count', 2 do
2108
- post :create, :project_id => 1,
2109
- :issue => {:tracker_id => 1,
2110
- :subject => 'This is a new issue with watchers',
2111
- :description => 'This is the description',
2112
- :priority_id => 5,
2113
- :watcher_user_ids => ['2', '3']}
2114
- end
2115
- end
2116
- issue = Issue.find_by_subject('This is a new issue with watchers')
2117
- assert_not_nil issue
2118
- assert_redirected_to :controller => 'issues', :action => 'show', :id => issue
2119
-
2120
- # Watchers added
2121
- assert_equal [2, 3], issue.watcher_user_ids.sort
2122
- assert issue.watched_by?(User.find(3))
2123
- # Watchers notified
2124
- mail = ActionMailer::Base.deliveries.last
2125
- assert_not_nil mail
2126
- assert [mail.bcc, mail.cc].flatten.include?(User.find(3).mail)
2127
- end
2128
-
2129
- def test_post_create_subissue
2130
- @request.session[:user_id] = 2
2131
-
2132
- assert_difference 'Issue.count' do
2133
- post :create, :project_id => 1,
2134
- :issue => {:tracker_id => 1,
2135
- :subject => 'This is a child issue',
2136
- :parent_issue_id => '2'}
2137
- assert_response 302
2138
- end
2139
- issue = Issue.order('id DESC').first
2140
- assert_equal Issue.find(2), issue.parent
2141
- end
2142
-
2143
- def test_post_create_subissue_with_sharp_parent_id
2144
- @request.session[:user_id] = 2
2145
-
2146
- assert_difference 'Issue.count' do
2147
- post :create, :project_id => 1,
2148
- :issue => {:tracker_id => 1,
2149
- :subject => 'This is a child issue',
2150
- :parent_issue_id => '#2'}
2151
- assert_response 302
2152
- end
2153
- issue = Issue.order('id DESC').first
2154
- assert_equal Issue.find(2), issue.parent
2155
- end
2156
-
2157
- def test_post_create_subissue_with_non_visible_parent_id_should_not_validate
2158
- @request.session[:user_id] = 2
2159
-
2160
- assert_no_difference 'Issue.count' do
2161
- post :create, :project_id => 1,
2162
- :issue => {:tracker_id => 1,
2163
- :subject => 'This is a child issue',
2164
- :parent_issue_id => '4'}
2165
-
2166
- assert_response :success
2167
- assert_select 'input[name=?][value=?]', 'issue[parent_issue_id]', '4'
2168
- assert_select_error /Parent task is invalid/i
2169
- end
2170
- end
2171
-
2172
- def test_post_create_subissue_with_non_numeric_parent_id_should_not_validate
2173
- @request.session[:user_id] = 2
2174
-
2175
- assert_no_difference 'Issue.count' do
2176
- post :create, :project_id => 1,
2177
- :issue => {:tracker_id => 1,
2178
- :subject => 'This is a child issue',
2179
- :parent_issue_id => '01ABC'}
2180
-
2181
- assert_response :success
2182
- assert_select 'input[name=?][value=?]', 'issue[parent_issue_id]', '01ABC'
2183
- assert_select_error /Parent task is invalid/i
2184
- end
2185
- end
2186
-
2187
- def test_post_create_private
2188
- @request.session[:user_id] = 2
2189
-
2190
- assert_difference 'Issue.count' do
2191
- post :create, :project_id => 1,
2192
- :issue => {:tracker_id => 1,
2193
- :subject => 'This is a private issue',
2194
- :is_private => '1'}
2195
- end
2196
- issue = Issue.order('id DESC').first
2197
- assert issue.is_private?
2198
- end
2199
-
2200
- def test_post_create_private_with_set_own_issues_private_permission
2201
- role = Role.find(1)
2202
- role.remove_permission! :set_issues_private
2203
- role.add_permission! :set_own_issues_private
2204
-
2205
- @request.session[:user_id] = 2
2206
-
2207
- assert_difference 'Issue.count' do
2208
- post :create, :project_id => 1,
2209
- :issue => {:tracker_id => 1,
2210
- :subject => 'This is a private issue',
2211
- :is_private => '1'}
2212
- end
2213
- issue = Issue.order('id DESC').first
2214
- assert issue.is_private?
2215
- end
2216
-
2217
- def test_create_without_project_id
2218
- @request.session[:user_id] = 2
2219
-
2220
- assert_difference 'Issue.count' do
2221
- post :create,
2222
- :issue => {:project_id => 3,
2223
- :tracker_id => 2,
2224
- :subject => 'Foo'}
2225
- assert_response 302
2226
- end
2227
- issue = Issue.order('id DESC').first
2228
- assert_equal 3, issue.project_id
2229
- assert_equal 2, issue.tracker_id
2230
- end
2231
-
2232
- def test_create_without_project_id_and_continue_should_redirect_without_project_id
2233
- @request.session[:user_id] = 2
2234
-
2235
- assert_difference 'Issue.count' do
2236
- post :create,
2237
- :issue => {:project_id => 3,
2238
- :tracker_id => 2,
2239
- :subject => 'Foo'},
2240
- :continue => '1'
2241
- assert_redirected_to '/issues/new?issue%5Bproject_id%5D=3&issue%5Btracker_id%5D=2'
2242
- end
2243
- end
2244
-
2245
- def test_create_without_project_id_should_be_denied_without_permission
2246
- Role.non_member.remove_permission! :add_issues
2247
- Role.anonymous.remove_permission! :add_issues
2248
- @request.session[:user_id] = 2
2249
-
2250
- assert_no_difference 'Issue.count' do
2251
- post :create,
2252
- :issue => {:project_id => 3,
2253
- :tracker_id => 2,
2254
- :subject => 'Foo'}
2255
- assert_response 422
2256
- end
2257
- end
2258
-
2259
- def test_create_without_project_id_with_failure
2260
- @request.session[:user_id] = 2
2261
-
2262
- post :create,
2263
- :issue => {:project_id => 3,
2264
- :tracker_id => 2,
2265
- :subject => ''}
2266
- assert_response :success
2267
- assert_nil assigns(:project)
2268
- end
2269
-
2270
- def test_post_create_should_send_a_notification
2271
- ActionMailer::Base.deliveries.clear
2272
- @request.session[:user_id] = 2
2273
- with_settings :notified_events => %w(issue_added) do
2274
- assert_difference 'Issue.count' do
2275
- post :create, :project_id => 1,
2276
- :issue => {:tracker_id => 3,
2277
- :subject => 'This is the test_new issue',
2278
- :description => 'This is the description',
2279
- :priority_id => 5,
2280
- :estimated_hours => '',
2281
- :custom_field_values => {'2' => 'Value for field 2'}}
2282
- end
2283
- assert_redirected_to :controller => 'issues', :action => 'show', :id => Issue.last.id
2284
-
2285
- assert_equal 1, ActionMailer::Base.deliveries.size
2286
- end
2287
- end
2288
-
2289
- def test_post_create_should_preserve_fields_values_on_validation_failure
2290
- @request.session[:user_id] = 2
2291
- post :create, :project_id => 1,
2292
- :issue => {:tracker_id => 1,
2293
- # empty subject
2294
- :subject => '',
2295
- :description => 'This is a description',
2296
- :priority_id => 6,
2297
- :custom_field_values => {'1' => 'Oracle', '2' => 'Value for field 2'}}
2298
- assert_response :success
2299
- assert_template 'new'
2300
-
2301
- assert_select 'textarea[name=?]', 'issue[description]', :text => 'This is a description'
2302
- assert_select 'select[name=?]', 'issue[priority_id]' do
2303
- assert_select 'option[value="6"][selected=selected]', :text => 'High'
2304
- end
2305
- # Custom fields
2306
- assert_select 'select[name=?]', 'issue[custom_field_values][1]' do
2307
- assert_select 'option[value=Oracle][selected=selected]', :text => 'Oracle'
2308
- end
2309
- assert_select 'input[name=?][value=?]', 'issue[custom_field_values][2]', 'Value for field 2'
2310
- end
2311
-
2312
- def test_post_create_with_failure_should_preserve_watchers
2313
- assert !User.find(8).member_of?(Project.find(1))
2314
-
2315
- @request.session[:user_id] = 2
2316
- post :create, :project_id => 1,
2317
- :issue => {:tracker_id => 1,
2318
- :watcher_user_ids => ['3', '8']}
2319
- assert_response :success
2320
- assert_template 'new'
2321
-
2322
- assert_select 'input[name=?][value="2"]:not(checked)', 'issue[watcher_user_ids][]'
2323
- assert_select 'input[name=?][value="3"][checked=checked]', 'issue[watcher_user_ids][]'
2324
- assert_select 'input[name=?][value="8"][checked=checked]', 'issue[watcher_user_ids][]'
2325
- end
2326
-
2327
- def test_post_create_should_ignore_non_safe_attributes
2328
- @request.session[:user_id] = 2
2329
- assert_nothing_raised do
2330
- post :create, :project_id => 1, :issue => { :tracker => "A param can not be a Tracker" }
2331
- end
2332
- end
2333
-
2334
- def test_post_create_with_attachment
2335
- set_tmp_attachments_directory
2336
- @request.session[:user_id] = 2
2337
-
2338
- assert_difference 'Issue.count' do
2339
- assert_difference 'Attachment.count' do
2340
- assert_no_difference 'Journal.count' do
2341
- post :create, :project_id => 1,
2342
- :issue => { :tracker_id => '1', :subject => 'With attachment' },
2343
- :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}}
2344
- end
2345
- end
2346
- end
2347
-
2348
- issue = Issue.order('id DESC').first
2349
- attachment = Attachment.order('id DESC').first
2350
-
2351
- assert_equal issue, attachment.container
2352
- assert_equal 2, attachment.author_id
2353
- assert_equal 'testfile.txt', attachment.filename
2354
- assert_equal 'text/plain', attachment.content_type
2355
- assert_equal 'test file', attachment.description
2356
- assert_equal 59, attachment.filesize
2357
- assert File.exists?(attachment.diskfile)
2358
- assert_equal 59, File.size(attachment.diskfile)
2359
- end
2360
-
2361
- def test_post_create_with_attachment_should_notify_with_attachments
2362
- ActionMailer::Base.deliveries.clear
2363
- set_tmp_attachments_directory
2364
- @request.session[:user_id] = 2
2365
-
2366
- with_settings :host_name => 'mydomain.foo', :protocol => 'http', :notified_events => %w(issue_added) do
2367
- assert_difference 'Issue.count' do
2368
- post :create, :project_id => 1,
2369
- :issue => { :tracker_id => '1', :subject => 'With attachment' },
2370
- :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}}
2371
- end
2372
- end
2373
-
2374
- assert_not_nil ActionMailer::Base.deliveries.last
2375
- assert_select_email do
2376
- assert_select 'a[href^=?]', 'http://mydomain.foo/attachments/download', 'testfile.txt'
2377
- end
2378
- end
2379
-
2380
- def test_post_create_with_failure_should_save_attachments
2381
- set_tmp_attachments_directory
2382
- @request.session[:user_id] = 2
2383
-
2384
- assert_no_difference 'Issue.count' do
2385
- assert_difference 'Attachment.count' do
2386
- post :create, :project_id => 1,
2387
- :issue => { :tracker_id => '1', :subject => '' },
2388
- :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}}
2389
- assert_response :success
2390
- assert_template 'new'
2391
- end
2392
- end
2393
-
2394
- attachment = Attachment.order('id DESC').first
2395
- assert_equal 'testfile.txt', attachment.filename
2396
- assert File.exists?(attachment.diskfile)
2397
- assert_nil attachment.container
2398
-
2399
- assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token
2400
- assert_select 'input[name=?][value=?]', 'attachments[p0][filename]', 'testfile.txt'
2401
- end
2402
-
2403
- def test_post_create_with_failure_should_keep_saved_attachments
2404
- set_tmp_attachments_directory
2405
- attachment = Attachment.create!(:file => uploaded_test_file("testfile.txt", "text/plain"), :author_id => 2)
2406
- @request.session[:user_id] = 2
2407
-
2408
- assert_no_difference 'Issue.count' do
2409
- assert_no_difference 'Attachment.count' do
2410
- post :create, :project_id => 1,
2411
- :issue => { :tracker_id => '1', :subject => '' },
2412
- :attachments => {'p0' => {'token' => attachment.token}}
2413
- assert_response :success
2414
- assert_template 'new'
2415
- end
2416
- end
2417
-
2418
- assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token
2419
- assert_select 'input[name=?][value=?]', 'attachments[p0][filename]', 'testfile.txt'
2420
- end
2421
-
2422
- def test_post_create_should_attach_saved_attachments
2423
- set_tmp_attachments_directory
2424
- attachment = Attachment.create!(:file => uploaded_test_file("testfile.txt", "text/plain"), :author_id => 2)
2425
- @request.session[:user_id] = 2
2426
-
2427
- assert_difference 'Issue.count' do
2428
- assert_no_difference 'Attachment.count' do
2429
- post :create, :project_id => 1,
2430
- :issue => { :tracker_id => '1', :subject => 'Saved attachments' },
2431
- :attachments => {'p0' => {'token' => attachment.token}}
2432
- assert_response 302
2433
- end
2434
- end
2435
-
2436
- issue = Issue.order('id DESC').first
2437
- assert_equal 1, issue.attachments.count
2438
-
2439
- attachment.reload
2440
- assert_equal issue, attachment.container
2441
- end
2442
-
2443
- def setup_without_workflow_privilege
2444
- WorkflowTransition.delete_all(["role_id = ?", Role.anonymous.id])
2445
- Role.anonymous.add_permission! :add_issues, :add_issue_notes
2446
- end
2447
- private :setup_without_workflow_privilege
2448
-
2449
- test "without workflow privilege #new should propose default status only" do
2450
- setup_without_workflow_privilege
2451
- get :new, :project_id => 1
2452
- assert_response :success
2453
- assert_template 'new'
2454
-
2455
- issue = assigns(:issue)
2456
- assert_not_nil issue.default_status
2457
-
2458
- assert_select 'select[name=?]', 'issue[status_id]' do
2459
- assert_select 'option', 1
2460
- assert_select 'option[value=?]', issue.default_status.id.to_s
2461
- end
2462
- end
2463
-
2464
- test "without workflow privilege #create should accept default status" do
2465
- setup_without_workflow_privilege
2466
- assert_difference 'Issue.count' do
2467
- post :create, :project_id => 1,
2468
- :issue => {:tracker_id => 1,
2469
- :subject => 'This is an issue',
2470
- :status_id => 1}
2471
- end
2472
- issue = Issue.order('id').last
2473
- assert_not_nil issue.default_status
2474
- assert_equal issue.default_status, issue.status
2475
- end
2476
-
2477
- test "without workflow privilege #create should ignore unauthorized status" do
2478
- setup_without_workflow_privilege
2479
- assert_difference 'Issue.count' do
2480
- post :create, :project_id => 1,
2481
- :issue => {:tracker_id => 1,
2482
- :subject => 'This is an issue',
2483
- :status_id => 3}
2484
- end
2485
- issue = Issue.order('id').last
2486
- assert_not_nil issue.default_status
2487
- assert_equal issue.default_status, issue.status
2488
- end
2489
-
2490
- test "without workflow privilege #update should ignore status change" do
2491
- setup_without_workflow_privilege
2492
- assert_difference 'Journal.count' do
2493
- put :update, :id => 1, :issue => {:status_id => 3, :notes => 'just trying'}
2494
- end
2495
- assert_equal 1, Issue.find(1).status_id
2496
- end
2497
-
2498
- test "without workflow privilege #update ignore attributes changes" do
2499
- setup_without_workflow_privilege
2500
- assert_difference 'Journal.count' do
2501
- put :update, :id => 1,
2502
- :issue => {:subject => 'changed', :assigned_to_id => 2,
2503
- :notes => 'just trying'}
2504
- end
2505
- issue = Issue.find(1)
2506
- assert_equal "Cannot print recipes", issue.subject
2507
- assert_nil issue.assigned_to
2508
- end
2509
-
2510
- def setup_with_workflow_privilege
2511
- WorkflowTransition.delete_all(["role_id = ?", Role.anonymous.id])
2512
- WorkflowTransition.create!(:role => Role.anonymous, :tracker_id => 1,
2513
- :old_status_id => 1, :new_status_id => 3)
2514
- WorkflowTransition.create!(:role => Role.anonymous, :tracker_id => 1,
2515
- :old_status_id => 1, :new_status_id => 4)
2516
- Role.anonymous.add_permission! :add_issues, :add_issue_notes
2517
- end
2518
- private :setup_with_workflow_privilege
2519
-
2520
- def setup_with_workflow_privilege_and_edit_issues_permission
2521
- setup_with_workflow_privilege
2522
- Role.anonymous.add_permission! :add_issues, :edit_issues
2523
- end
2524
- private :setup_with_workflow_privilege_and_edit_issues_permission
2525
-
2526
- test "with workflow privilege and :edit_issues permission should accept authorized status" do
2527
- setup_with_workflow_privilege_and_edit_issues_permission
2528
- assert_difference 'Journal.count' do
2529
- put :update, :id => 1, :issue => {:status_id => 3, :notes => 'just trying'}
2530
- end
2531
- assert_equal 3, Issue.find(1).status_id
2532
- end
2533
-
2534
- test "with workflow privilege and :edit_issues permission should ignore unauthorized status" do
2535
- setup_with_workflow_privilege_and_edit_issues_permission
2536
- assert_difference 'Journal.count' do
2537
- put :update, :id => 1, :issue => {:status_id => 2, :notes => 'just trying'}
2538
- end
2539
- assert_equal 1, Issue.find(1).status_id
2540
- end
2541
-
2542
- test "with workflow privilege and :edit_issues permission should accept authorized attributes changes" do
2543
- setup_with_workflow_privilege_and_edit_issues_permission
2544
- assert_difference 'Journal.count' do
2545
- put :update, :id => 1,
2546
- :issue => {:subject => 'changed', :assigned_to_id => 2,
2547
- :notes => 'just trying'}
2548
- end
2549
- issue = Issue.find(1)
2550
- assert_equal "changed", issue.subject
2551
- assert_equal 2, issue.assigned_to_id
2552
- end
2553
-
2554
- def test_new_as_copy
2555
- @request.session[:user_id] = 2
2556
- get :new, :project_id => 1, :copy_from => 1
2557
-
2558
- assert_response :success
2559
- assert_template 'new'
2560
-
2561
- assert_not_nil assigns(:issue)
2562
- orig = Issue.find(1)
2563
- assert_equal 1, assigns(:issue).project_id
2564
- assert_equal orig.subject, assigns(:issue).subject
2565
- assert assigns(:issue).copy?
2566
-
2567
- assert_select 'form[id=issue-form][action="/projects/ecookbook/issues"]' do
2568
- assert_select 'select[name=?]', 'issue[project_id]' do
2569
- assert_select 'option[value="1"][selected=selected]', :text => 'eCookbook'
2570
- assert_select 'option[value="2"]:not([selected])', :text => 'OnlineStore'
2571
- end
2572
- assert_select 'input[name=copy_from][value="1"]'
2573
- end
2574
-
2575
- # "New issue" menu item should not link to copy
2576
- assert_select '#main-menu a.new-issue[href="/projects/ecookbook/issues/new"]'
2577
- end
2578
-
2579
- def test_new_as_copy_without_add_issues_permission_should_not_propose_current_project_as_target
2580
- user = setup_user_with_copy_but_not_add_permission
2581
-
2582
- @request.session[:user_id] = user.id
2583
- get :new, :project_id => 1, :copy_from => 1
2584
-
2585
- assert_response :success
2586
- assert_template 'new'
2587
- assert_select 'select[name=?]', 'issue[project_id]' do
2588
- assert_select 'option[value="1"]', 0
2589
- assert_select 'option[value="2"]', :text => 'OnlineStore'
2590
- end
2591
- end
2592
-
2593
- def test_new_as_copy_with_attachments_should_show_copy_attachments_checkbox
2594
- @request.session[:user_id] = 2
2595
- issue = Issue.find(3)
2596
- assert issue.attachments.count > 0
2597
- get :new, :project_id => 1, :copy_from => 3
2598
-
2599
- assert_select 'input[name=copy_attachments][type=checkbox][checked=checked][value="1"]'
2600
- end
2601
-
2602
- def test_new_as_copy_without_attachments_should_not_show_copy_attachments_checkbox
2603
- @request.session[:user_id] = 2
2604
- issue = Issue.find(3)
2605
- issue.attachments.delete_all
2606
- get :new, :project_id => 1, :copy_from => 3
2607
-
2608
- assert_select 'input[name=copy_attachments]', 0
2609
- end
2610
-
2611
- def test_new_as_copy_with_subtasks_should_show_copy_subtasks_checkbox
2612
- @request.session[:user_id] = 2
2613
- issue = Issue.generate_with_descendants!
2614
- get :new, :project_id => 1, :copy_from => issue.id
2615
-
2616
- assert_select 'input[type=checkbox][name=copy_subtasks][checked=checked][value="1"]'
2617
- end
2618
-
2619
- def test_new_as_copy_with_invalid_issue_should_respond_with_404
2620
- @request.session[:user_id] = 2
2621
- get :new, :project_id => 1, :copy_from => 99999
2622
- assert_response 404
2623
- end
2624
-
2625
- def test_create_as_copy_on_different_project
2626
- @request.session[:user_id] = 2
2627
- assert_difference 'Issue.count' do
2628
- post :create, :project_id => 1, :copy_from => 1,
2629
- :issue => {:project_id => '2', :tracker_id => '3', :status_id => '1', :subject => 'Copy'}
2630
-
2631
- assert_not_nil assigns(:issue)
2632
- assert assigns(:issue).copy?
2633
- end
2634
- issue = Issue.order('id DESC').first
2635
- assert_redirected_to "/issues/#{issue.id}"
2636
-
2637
- assert_equal 2, issue.project_id
2638
- assert_equal 3, issue.tracker_id
2639
- assert_equal 'Copy', issue.subject
2640
- end
2641
-
2642
- def test_create_as_copy_should_allow_status_to_be_set_to_default
2643
- copied = Issue.generate! :status_id => 2
2644
- assert_equal 2, copied.reload.status_id
2645
-
2646
- @request.session[:user_id] = 2
2647
- assert_difference 'Issue.count' do
2648
- post :create, :project_id => 1, :copy_from => copied.id,
2649
- :issue => {:project_id => '1', :tracker_id => '1', :status_id => '1'},
2650
- :was_default_status => '1'
2651
- end
2652
- issue = Issue.order('id DESC').first
2653
- assert_equal 1, issue.status_id
2654
- end
2655
-
2656
- def test_create_as_copy_should_copy_attachments
2657
- @request.session[:user_id] = 2
2658
- issue = Issue.find(3)
2659
- count = issue.attachments.count
2660
- assert count > 0
2661
- assert_difference 'Issue.count' do
2662
- assert_difference 'Attachment.count', count do
2663
- post :create, :project_id => 1, :copy_from => 3,
2664
- :issue => {:project_id => '1', :tracker_id => '3',
2665
- :status_id => '1', :subject => 'Copy with attachments'},
2666
- :copy_attachments => '1'
2667
- end
2668
- end
2669
- copy = Issue.order('id DESC').first
2670
- assert_equal count, copy.attachments.count
2671
- assert_equal issue.attachments.map(&:filename).sort, copy.attachments.map(&:filename).sort
2672
- end
2673
-
2674
- def test_create_as_copy_without_copy_attachments_option_should_not_copy_attachments
2675
- @request.session[:user_id] = 2
2676
- issue = Issue.find(3)
2677
- count = issue.attachments.count
2678
- assert count > 0
2679
- assert_difference 'Issue.count' do
2680
- assert_no_difference 'Attachment.count' do
2681
- post :create, :project_id => 1, :copy_from => 3,
2682
- :issue => {:project_id => '1', :tracker_id => '3',
2683
- :status_id => '1', :subject => 'Copy with attachments'}
2684
- end
2685
- end
2686
- copy = Issue.order('id DESC').first
2687
- assert_equal 0, copy.attachments.count
2688
- end
2689
-
2690
- def test_create_as_copy_with_attachments_should_also_add_new_files
2691
- @request.session[:user_id] = 2
2692
- issue = Issue.find(3)
2693
- count = issue.attachments.count
2694
- assert count > 0
2695
- assert_difference 'Issue.count' do
2696
- assert_difference 'Attachment.count', count + 1 do
2697
- post :create, :project_id => 1, :copy_from => 3,
2698
- :issue => {:project_id => '1', :tracker_id => '3',
2699
- :status_id => '1', :subject => 'Copy with attachments'},
2700
- :copy_attachments => '1',
2701
- :attachments => {'1' =>
2702
- {'file' => uploaded_test_file('testfile.txt', 'text/plain'),
2703
- 'description' => 'test file'}}
2704
- end
2705
- end
2706
- copy = Issue.order('id DESC').first
2707
- assert_equal count + 1, copy.attachments.count
2708
- end
2709
-
2710
- def test_create_as_copy_should_add_relation_with_copied_issue
2711
- @request.session[:user_id] = 2
2712
- assert_difference 'Issue.count' do
2713
- assert_difference 'IssueRelation.count' do
2714
- post :create, :project_id => 1, :copy_from => 1, :link_copy => '1',
2715
- :issue => {:project_id => '1', :tracker_id => '3',
2716
- :status_id => '1', :subject => 'Copy'}
2717
- end
2718
- end
2719
- copy = Issue.order('id DESC').first
2720
- assert_equal 1, copy.relations.size
2721
- end
2722
-
2723
- def test_create_as_copy_should_allow_not_to_add_relation_with_copied_issue
2724
- @request.session[:user_id] = 2
2725
- assert_difference 'Issue.count' do
2726
- assert_no_difference 'IssueRelation.count' do
2727
- post :create, :project_id => 1, :copy_from => 1,
2728
- :issue => {:subject => 'Copy'}
2729
- end
2730
- end
2731
- end
2732
-
2733
- def test_create_as_copy_should_always_add_relation_with_copied_issue_by_setting
2734
- with_settings :link_copied_issue => 'yes' do
2735
- @request.session[:user_id] = 2
2736
- assert_difference 'Issue.count' do
2737
- assert_difference 'IssueRelation.count' do
2738
- post :create, :project_id => 1, :copy_from => 1,
2739
- :issue => {:subject => 'Copy'}
2740
- end
2741
- end
2742
- end
2743
- end
2744
-
2745
- def test_create_as_copy_should_never_add_relation_with_copied_issue_by_setting
2746
- with_settings :link_copied_issue => 'no' do
2747
- @request.session[:user_id] = 2
2748
- assert_difference 'Issue.count' do
2749
- assert_no_difference 'IssueRelation.count' do
2750
- post :create, :project_id => 1, :copy_from => 1, :link_copy => '1',
2751
- :issue => {:subject => 'Copy'}
2752
- end
2753
- end
2754
- end
2755
- end
2756
-
2757
- def test_create_as_copy_should_copy_subtasks
2758
- @request.session[:user_id] = 2
2759
- issue = Issue.generate_with_descendants!
2760
- count = issue.descendants.count
2761
- assert_difference 'Issue.count', count + 1 do
2762
- post :create, :project_id => 1, :copy_from => issue.id,
2763
- :issue => {:project_id => '1', :tracker_id => '3',
2764
- :status_id => '1', :subject => 'Copy with subtasks'},
2765
- :copy_subtasks => '1'
2766
- end
2767
- copy = Issue.where(:parent_id => nil).order('id DESC').first
2768
- assert_equal count, copy.descendants.count
2769
- assert_equal issue.descendants.map(&:subject).sort, copy.descendants.map(&:subject).sort
2770
- end
2771
-
2772
- def test_create_as_copy_without_copy_subtasks_option_should_not_copy_subtasks
2773
- @request.session[:user_id] = 2
2774
- issue = Issue.generate_with_descendants!
2775
- assert_difference 'Issue.count', 1 do
2776
- post :create, :project_id => 1, :copy_from => 3,
2777
- :issue => {:project_id => '1', :tracker_id => '3',
2778
- :status_id => '1', :subject => 'Copy with subtasks'}
2779
- end
2780
- copy = Issue.where(:parent_id => nil).order('id DESC').first
2781
- assert_equal 0, copy.descendants.count
2782
- end
2783
-
2784
- def test_create_as_copy_with_failure
2785
- @request.session[:user_id] = 2
2786
- post :create, :project_id => 1, :copy_from => 1,
2787
- :issue => {:project_id => '2', :tracker_id => '3', :status_id => '1', :subject => ''}
2788
-
2789
- assert_response :success
2790
- assert_template 'new'
2791
-
2792
- assert_not_nil assigns(:issue)
2793
- assert assigns(:issue).copy?
2794
-
2795
- assert_select 'form#issue-form[action="/projects/ecookbook/issues"]' do
2796
- assert_select 'select[name=?]', 'issue[project_id]' do
2797
- assert_select 'option[value="1"]:not([selected])', :text => 'eCookbook'
2798
- assert_select 'option[value="2"][selected=selected]', :text => 'OnlineStore'
2799
- end
2800
- assert_select 'input[name=copy_from][value="1"]'
2801
- end
2802
- end
2803
-
2804
- def test_create_as_copy_on_project_without_permission_should_ignore_target_project
2805
- @request.session[:user_id] = 2
2806
- assert !User.find(2).member_of?(Project.find(4))
2807
-
2808
- assert_difference 'Issue.count' do
2809
- post :create, :project_id => 1, :copy_from => 1,
2810
- :issue => {:project_id => '4', :tracker_id => '3', :status_id => '1', :subject => 'Copy'}
2811
- end
2812
- issue = Issue.order('id DESC').first
2813
- assert_equal 1, issue.project_id
2814
- end
2815
-
2816
- def test_get_edit
2817
- @request.session[:user_id] = 2
2818
- get :edit, :id => 1
2819
- assert_response :success
2820
- assert_template 'edit'
2821
- assert_not_nil assigns(:issue)
2822
- assert_equal Issue.find(1), assigns(:issue)
2823
-
2824
- # Be sure we don't display inactive IssuePriorities
2825
- assert ! IssuePriority.find(15).active?
2826
- assert_select 'select[name=?]', 'issue[priority_id]' do
2827
- assert_select 'option[value="15"]', 0
2828
- end
2829
- end
2830
-
2831
- def test_get_edit_should_display_the_time_entry_form_with_log_time_permission
2832
- @request.session[:user_id] = 2
2833
- Role.find_by_name('Manager').update_attribute :permissions, [:view_issues, :edit_issues, :log_time]
2834
-
2835
- get :edit, :id => 1
2836
- assert_select 'input[name=?]', 'time_entry[hours]'
2837
- end
2838
-
2839
- def test_get_edit_should_not_display_the_time_entry_form_without_log_time_permission
2840
- @request.session[:user_id] = 2
2841
- Role.find_by_name('Manager').remove_permission! :log_time
2842
-
2843
- get :edit, :id => 1
2844
- assert_select 'input[name=?]', 'time_entry[hours]', 0
2845
- end
2846
-
2847
- def test_get_edit_with_params
2848
- @request.session[:user_id] = 2
2849
- get :edit, :id => 1, :issue => { :status_id => 5, :priority_id => 7 },
2850
- :time_entry => { :hours => '2.5', :comments => 'test_get_edit_with_params', :activity_id => 10 }
2851
- assert_response :success
2852
- assert_template 'edit'
2853
-
2854
- issue = assigns(:issue)
2855
- assert_not_nil issue
2856
-
2857
- assert_equal 5, issue.status_id
2858
- assert_select 'select[name=?]', 'issue[status_id]' do
2859
- assert_select 'option[value="5"][selected=selected]', :text => 'Closed'
2860
- end
2861
-
2862
- assert_equal 7, issue.priority_id
2863
- assert_select 'select[name=?]', 'issue[priority_id]' do
2864
- assert_select 'option[value="7"][selected=selected]', :text => 'Urgent'
2865
- end
2866
-
2867
- assert_select 'input[name=?][value="2.5"]', 'time_entry[hours]'
2868
- assert_select 'select[name=?]', 'time_entry[activity_id]' do
2869
- assert_select 'option[value="10"][selected=selected]', :text => 'Development'
2870
- end
2871
- assert_select 'input[name=?][value=test_get_edit_with_params]', 'time_entry[comments]'
2872
- end
2873
-
2874
- def test_get_edit_with_multi_custom_field
2875
- field = CustomField.find(1)
2876
- field.update_attribute :multiple, true
2877
- issue = Issue.find(1)
2878
- issue.custom_field_values = {1 => ['MySQL', 'Oracle']}
2879
- issue.save!
2880
-
2881
- @request.session[:user_id] = 2
2882
- get :edit, :id => 1
2883
- assert_response :success
2884
- assert_template 'edit'
2885
-
2886
- assert_select 'select[name=?][multiple=multiple]', 'issue[custom_field_values][1][]' do
2887
- assert_select 'option', 3
2888
- assert_select 'option[value=MySQL][selected=selected]'
2889
- assert_select 'option[value=Oracle][selected=selected]'
2890
- assert_select 'option[value=PostgreSQL]:not([selected])'
2891
- end
2892
- end
2893
-
2894
- def test_update_form_for_existing_issue
2895
- @request.session[:user_id] = 2
2896
- xhr :patch, :edit, :id => 1,
2897
- :issue => {:tracker_id => 2,
2898
- :subject => 'This is the test_new issue',
2899
- :description => 'This is the description',
2900
- :priority_id => 5}
2901
- assert_response :success
2902
- assert_equal 'text/javascript', response.content_type
2903
- assert_template 'edit'
2904
- assert_template :partial => '_form'
2905
-
2906
- issue = assigns(:issue)
2907
- assert_kind_of Issue, issue
2908
- assert_equal 1, issue.id
2909
- assert_equal 1, issue.project_id
2910
- assert_equal 2, issue.tracker_id
2911
- assert_equal 'This is the test_new issue', issue.subject
2912
- end
2913
-
2914
- def test_update_form_for_existing_issue_should_keep_issue_author
2915
- @request.session[:user_id] = 3
2916
- xhr :patch, :edit, :id => 1, :issue => {:subject => 'Changed'}
2917
- assert_response :success
2918
- assert_equal 'text/javascript', response.content_type
2919
-
2920
- issue = assigns(:issue)
2921
- assert_equal User.find(2), issue.author
2922
- assert_equal 2, issue.author_id
2923
- assert_not_equal User.current, issue.author
2924
- end
2925
-
2926
- def test_update_form_for_existing_issue_should_propose_transitions_based_on_initial_status
2927
- @request.session[:user_id] = 2
2928
- WorkflowTransition.delete_all
2929
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 2, :new_status_id => 1)
2930
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 2, :new_status_id => 5)
2931
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 5, :new_status_id => 4)
2932
-
2933
- xhr :patch, :edit, :id => 2,
2934
- :issue => {:tracker_id => 2,
2935
- :status_id => 5,
2936
- :subject => 'This is an issue'}
2937
-
2938
- assert_equal 5, assigns(:issue).status_id
2939
- assert_equal [1,2,5], assigns(:allowed_statuses).map(&:id).sort
2940
- end
2941
-
2942
- def test_update_form_for_existing_issue_with_project_change
2943
- @request.session[:user_id] = 2
2944
- xhr :patch, :edit, :id => 1,
2945
- :issue => {:project_id => 2,
2946
- :tracker_id => 2,
2947
- :subject => 'This is the test_new issue',
2948
- :description => 'This is the description',
2949
- :priority_id => 5}
2950
- assert_response :success
2951
- assert_template :partial => '_form'
2952
-
2953
- issue = assigns(:issue)
2954
- assert_kind_of Issue, issue
2955
- assert_equal 1, issue.id
2956
- assert_equal 2, issue.project_id
2957
- assert_equal 2, issue.tracker_id
2958
- assert_equal 'This is the test_new issue', issue.subject
2959
- end
2960
-
2961
- def test_update_form_should_propose_default_status_for_existing_issue
2962
- @request.session[:user_id] = 2
2963
- WorkflowTransition.delete_all
2964
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 2, :old_status_id => 2, :new_status_id => 3)
2965
-
2966
- xhr :patch, :edit, :id => 2
2967
- assert_response :success
2968
- assert_equal [2,3], assigns(:allowed_statuses).map(&:id).sort
2969
- end
2970
-
2971
- def test_put_update_without_custom_fields_param
2972
- @request.session[:user_id] = 2
2973
-
2974
- issue = Issue.find(1)
2975
- assert_equal '125', issue.custom_value_for(2).value
2976
-
2977
- assert_difference('Journal.count') do
2978
- assert_difference('JournalDetail.count') do
2979
- put :update, :id => 1, :issue => {:subject => 'New subject'}
2980
- end
2981
- end
2982
- assert_redirected_to :action => 'show', :id => '1'
2983
- issue.reload
2984
- assert_equal 'New subject', issue.subject
2985
- # Make sure custom fields were not cleared
2986
- assert_equal '125', issue.custom_value_for(2).value
2987
- end
2988
-
2989
- def test_put_update_with_project_change
2990
- @request.session[:user_id] = 2
2991
- ActionMailer::Base.deliveries.clear
2992
-
2993
- with_settings :notified_events => %w(issue_updated) do
2994
- assert_difference('Journal.count') do
2995
- assert_difference('JournalDetail.count', 3) do
2996
- put :update, :id => 1, :issue => {:project_id => '2',
2997
- :tracker_id => '1', # no change
2998
- :priority_id => '6',
2999
- :category_id => '3'
3000
- }
3001
- end
3002
- end
3003
- end
3004
- assert_redirected_to :action => 'show', :id => '1'
3005
- issue = Issue.find(1)
3006
- assert_equal 2, issue.project_id
3007
- assert_equal 1, issue.tracker_id
3008
- assert_equal 6, issue.priority_id
3009
- assert_equal 3, issue.category_id
3010
-
3011
- mail = ActionMailer::Base.deliveries.last
3012
- assert_not_nil mail
3013
- assert mail.subject.starts_with?("[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]")
3014
- assert_mail_body_match "Project changed from eCookbook to OnlineStore", mail
3015
- end
3016
-
3017
- def test_put_update_with_tracker_change
3018
- @request.session[:user_id] = 2
3019
- ActionMailer::Base.deliveries.clear
3020
-
3021
- with_settings :notified_events => %w(issue_updated) do
3022
- assert_difference('Journal.count') do
3023
- assert_difference('JournalDetail.count', 2) do
3024
- put :update, :id => 1, :issue => {:project_id => '1',
3025
- :tracker_id => '2',
3026
- :priority_id => '6'
3027
- }
3028
- end
3029
- end
3030
- end
3031
- assert_redirected_to :action => 'show', :id => '1'
3032
- issue = Issue.find(1)
3033
- assert_equal 1, issue.project_id
3034
- assert_equal 2, issue.tracker_id
3035
- assert_equal 6, issue.priority_id
3036
- assert_equal 1, issue.category_id
3037
-
3038
- mail = ActionMailer::Base.deliveries.last
3039
- assert_not_nil mail
3040
- assert mail.subject.starts_with?("[#{issue.project.name} - #{issue.tracker.name} ##{issue.id}]")
3041
- assert_mail_body_match "Tracker changed from Bug to Feature request", mail
3042
- end
3043
-
3044
- def test_put_update_with_custom_field_change
3045
- @request.session[:user_id] = 2
3046
- issue = Issue.find(1)
3047
- assert_equal '125', issue.custom_value_for(2).value
3048
-
3049
- with_settings :notified_events => %w(issue_updated) do
3050
- assert_difference('Journal.count') do
3051
- assert_difference('JournalDetail.count', 3) do
3052
- put :update, :id => 1, :issue => {:subject => 'Custom field change',
3053
- :priority_id => '6',
3054
- :category_id => '1', # no change
3055
- :custom_field_values => { '2' => 'New custom value' }
3056
- }
3057
- end
3058
- end
3059
- end
3060
- assert_redirected_to :action => 'show', :id => '1'
3061
- issue.reload
3062
- assert_equal 'New custom value', issue.custom_value_for(2).value
3063
-
3064
- mail = ActionMailer::Base.deliveries.last
3065
- assert_not_nil mail
3066
- assert_mail_body_match "Searchable field changed from 125 to New custom value", mail
3067
- end
3068
-
3069
- def test_put_update_with_multi_custom_field_change
3070
- field = CustomField.find(1)
3071
- field.update_attribute :multiple, true
3072
- issue = Issue.find(1)
3073
- issue.custom_field_values = {1 => ['MySQL', 'Oracle']}
3074
- issue.save!
3075
-
3076
- @request.session[:user_id] = 2
3077
- assert_difference('Journal.count') do
3078
- assert_difference('JournalDetail.count', 3) do
3079
- put :update, :id => 1,
3080
- :issue => {
3081
- :subject => 'Custom field change',
3082
- :custom_field_values => { '1' => ['', 'Oracle', 'PostgreSQL'] }
3083
- }
3084
- end
3085
- end
3086
- assert_redirected_to :action => 'show', :id => '1'
3087
- assert_equal ['Oracle', 'PostgreSQL'], Issue.find(1).custom_field_value(1).sort
3088
- end
3089
-
3090
- def test_put_update_with_status_and_assignee_change
3091
- issue = Issue.find(1)
3092
- assert_equal 1, issue.status_id
3093
- @request.session[:user_id] = 2
3094
-
3095
- with_settings :notified_events => %w(issue_updated) do
3096
- assert_difference('TimeEntry.count', 0) do
3097
- put :update,
3098
- :id => 1,
3099
- :issue => { :status_id => 2, :assigned_to_id => 3, :notes => 'Assigned to dlopper' },
3100
- :time_entry => { :hours => '', :comments => '', :activity_id => TimeEntryActivity.first }
3101
- end
3102
- end
3103
- assert_redirected_to :action => 'show', :id => '1'
3104
- issue.reload
3105
- assert_equal 2, issue.status_id
3106
- j = Journal.order('id DESC').first
3107
- assert_equal 'Assigned to dlopper', j.notes
3108
- assert_equal 2, j.details.size
3109
-
3110
- mail = ActionMailer::Base.deliveries.last
3111
- assert_mail_body_match "Status changed from New to Assigned", mail
3112
- # subject should contain the new status
3113
- assert mail.subject.include?("(#{ IssueStatus.find(2).name })")
3114
- end
3115
-
3116
- def test_put_update_with_note_only
3117
- notes = 'Note added by IssuesControllerTest#test_update_with_note_only'
3118
-
3119
- with_settings :notified_events => %w(issue_updated) do
3120
- # anonymous user
3121
- put :update,
3122
- :id => 1,
3123
- :issue => { :notes => notes }
3124
- end
3125
- assert_redirected_to :action => 'show', :id => '1'
3126
- j = Journal.order('id DESC').first
3127
- assert_equal notes, j.notes
3128
- assert_equal 0, j.details.size
3129
- assert_equal User.anonymous, j.user
3130
-
3131
- mail = ActionMailer::Base.deliveries.last
3132
- assert_mail_body_match notes, mail
3133
- end
3134
-
3135
- def test_put_update_with_private_note_only
3136
- notes = 'Private note'
3137
- @request.session[:user_id] = 2
3138
-
3139
- assert_difference 'Journal.count' do
3140
- put :update, :id => 1, :issue => {:notes => notes, :private_notes => '1'}
3141
- assert_redirected_to :action => 'show', :id => '1'
3142
- end
3143
-
3144
- j = Journal.order('id DESC').first
3145
- assert_equal notes, j.notes
3146
- assert_equal true, j.private_notes
3147
- end
3148
-
3149
- def test_put_update_with_private_note_and_changes
3150
- notes = 'Private note'
3151
- @request.session[:user_id] = 2
3152
-
3153
- assert_difference 'Journal.count', 2 do
3154
- put :update, :id => 1, :issue => {:subject => 'New subject', :notes => notes, :private_notes => '1'}
3155
- assert_redirected_to :action => 'show', :id => '1'
3156
- end
3157
-
3158
- j = Journal.order('id DESC').first
3159
- assert_equal notes, j.notes
3160
- assert_equal true, j.private_notes
3161
- assert_equal 0, j.details.count
3162
-
3163
- j = Journal.order('id DESC').offset(1).first
3164
- assert_nil j.notes
3165
- assert_equal false, j.private_notes
3166
- assert_equal 1, j.details.count
3167
- end
3168
-
3169
- def test_put_update_with_note_and_spent_time
3170
- @request.session[:user_id] = 2
3171
- spent_hours_before = Issue.find(1).spent_hours
3172
- assert_difference('TimeEntry.count') do
3173
- put :update,
3174
- :id => 1,
3175
- :issue => { :notes => '2.5 hours added' },
3176
- :time_entry => { :hours => '2.5', :comments => 'test_put_update_with_note_and_spent_time', :activity_id => TimeEntryActivity.first.id }
3177
- end
3178
- assert_redirected_to :action => 'show', :id => '1'
3179
-
3180
- issue = Issue.find(1)
3181
-
3182
- j = Journal.order('id DESC').first
3183
- assert_equal '2.5 hours added', j.notes
3184
- assert_equal 0, j.details.size
3185
-
3186
- t = issue.time_entries.find_by_comments('test_put_update_with_note_and_spent_time')
3187
- assert_not_nil t
3188
- assert_equal 2.5, t.hours
3189
- assert_equal spent_hours_before + 2.5, issue.spent_hours
3190
- end
3191
-
3192
- def test_put_update_should_preserve_parent_issue_even_if_not_visible
3193
- parent = Issue.generate!(:project_id => 1, :is_private => true)
3194
- issue = Issue.generate!(:parent_issue_id => parent.id)
3195
- assert !parent.visible?(User.find(3))
3196
- @request.session[:user_id] = 3
3197
-
3198
- get :edit, :id => issue.id
3199
- assert_select 'input[name=?][value=?]', 'issue[parent_issue_id]', parent.id.to_s
3200
-
3201
- put :update, :id => issue.id, :issue => {:subject => 'New subject', :parent_issue_id => parent.id.to_s}
3202
- assert_response 302
3203
- assert_equal parent, issue.parent
3204
- end
3205
-
3206
- def test_put_update_with_attachment_only
3207
- set_tmp_attachments_directory
3208
-
3209
- # Delete all fixtured journals, a race condition can occur causing the wrong
3210
- # journal to get fetched in the next find.
3211
- Journal.delete_all
3212
-
3213
- with_settings :notified_events => %w(issue_updated) do
3214
- # anonymous user
3215
- assert_difference 'Attachment.count' do
3216
- put :update, :id => 1,
3217
- :issue => {:notes => ''},
3218
- :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}}
3219
- end
3220
- end
3221
-
3222
- assert_redirected_to :action => 'show', :id => '1'
3223
- j = Issue.find(1).journals.reorder('id DESC').first
3224
- assert j.notes.blank?
3225
- assert_equal 1, j.details.size
3226
- assert_equal 'testfile.txt', j.details.first.value
3227
- assert_equal User.anonymous, j.user
3228
-
3229
- attachment = Attachment.order('id DESC').first
3230
- assert_equal Issue.find(1), attachment.container
3231
- assert_equal User.anonymous, attachment.author
3232
- assert_equal 'testfile.txt', attachment.filename
3233
- assert_equal 'text/plain', attachment.content_type
3234
- assert_equal 'test file', attachment.description
3235
- assert_equal 59, attachment.filesize
3236
- assert File.exists?(attachment.diskfile)
3237
- assert_equal 59, File.size(attachment.diskfile)
3238
-
3239
- mail = ActionMailer::Base.deliveries.last
3240
- assert_mail_body_match 'testfile.txt', mail
3241
- end
3242
-
3243
- def test_put_update_with_failure_should_save_attachments
3244
- set_tmp_attachments_directory
3245
- @request.session[:user_id] = 2
3246
-
3247
- assert_no_difference 'Journal.count' do
3248
- assert_difference 'Attachment.count' do
3249
- put :update, :id => 1,
3250
- :issue => { :subject => '' },
3251
- :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain'), 'description' => 'test file'}}
3252
- assert_response :success
3253
- assert_template 'edit'
3254
- end
3255
- end
3256
-
3257
- attachment = Attachment.order('id DESC').first
3258
- assert_equal 'testfile.txt', attachment.filename
3259
- assert File.exists?(attachment.diskfile)
3260
- assert_nil attachment.container
3261
-
3262
- assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token
3263
- assert_select 'input[name=?][value=?]', 'attachments[p0][filename]', 'testfile.txt'
3264
- end
3265
-
3266
- def test_put_update_with_failure_should_keep_saved_attachments
3267
- set_tmp_attachments_directory
3268
- attachment = Attachment.create!(:file => uploaded_test_file("testfile.txt", "text/plain"), :author_id => 2)
3269
- @request.session[:user_id] = 2
3270
-
3271
- assert_no_difference 'Journal.count' do
3272
- assert_no_difference 'Attachment.count' do
3273
- put :update, :id => 1,
3274
- :issue => { :subject => '' },
3275
- :attachments => {'p0' => {'token' => attachment.token}}
3276
- assert_response :success
3277
- assert_template 'edit'
3278
- end
3279
- end
3280
-
3281
- assert_select 'input[name=?][value=?]', 'attachments[p0][token]', attachment.token
3282
- assert_select 'input[name=?][value=?]', 'attachments[p0][filename]', 'testfile.txt'
3283
- end
3284
-
3285
- def test_put_update_should_attach_saved_attachments
3286
- set_tmp_attachments_directory
3287
- attachment = Attachment.create!(:file => uploaded_test_file("testfile.txt", "text/plain"), :author_id => 2)
3288
- @request.session[:user_id] = 2
3289
-
3290
- assert_difference 'Journal.count' do
3291
- assert_difference 'JournalDetail.count' do
3292
- assert_no_difference 'Attachment.count' do
3293
- put :update, :id => 1,
3294
- :issue => {:notes => 'Attachment added'},
3295
- :attachments => {'p0' => {'token' => attachment.token}}
3296
- assert_redirected_to '/issues/1'
3297
- end
3298
- end
3299
- end
3300
-
3301
- attachment.reload
3302
- assert_equal Issue.find(1), attachment.container
3303
-
3304
- journal = Journal.order('id DESC').first
3305
- assert_equal 1, journal.details.size
3306
- assert_equal 'testfile.txt', journal.details.first.value
3307
- end
3308
-
3309
- def test_put_update_with_attachment_that_fails_to_save
3310
- set_tmp_attachments_directory
3311
-
3312
- # anonymous user
3313
- with_settings :attachment_max_size => 0 do
3314
- put :update,
3315
- :id => 1,
3316
- :issue => {:notes => ''},
3317
- :attachments => {'1' => {'file' => uploaded_test_file('testfile.txt', 'text/plain')}}
3318
- assert_redirected_to :action => 'show', :id => '1'
3319
- assert_equal '1 file(s) could not be saved.', flash[:warning]
3320
- end
3321
- end
3322
-
3323
- def test_put_update_with_no_change
3324
- issue = Issue.find(1)
3325
- issue.journals.clear
3326
- ActionMailer::Base.deliveries.clear
3327
-
3328
- put :update,
3329
- :id => 1,
3330
- :issue => {:notes => ''}
3331
- assert_redirected_to :action => 'show', :id => '1'
3332
-
3333
- issue.reload
3334
- assert issue.journals.empty?
3335
- # No email should be sent
3336
- assert ActionMailer::Base.deliveries.empty?
3337
- end
3338
-
3339
- def test_put_update_should_send_a_notification
3340
- @request.session[:user_id] = 2
3341
- ActionMailer::Base.deliveries.clear
3342
- issue = Issue.find(1)
3343
- old_subject = issue.subject
3344
- new_subject = 'Subject modified by IssuesControllerTest#test_post_edit'
3345
-
3346
- with_settings :notified_events => %w(issue_updated) do
3347
- put :update, :id => 1, :issue => {:subject => new_subject,
3348
- :priority_id => '6',
3349
- :category_id => '1' # no change
3350
- }
3351
- assert_equal 1, ActionMailer::Base.deliveries.size
3352
- end
3353
- end
3354
-
3355
- def test_put_update_with_invalid_spent_time_hours_only
3356
- @request.session[:user_id] = 2
3357
- notes = 'Note added by IssuesControllerTest#test_post_edit_with_invalid_spent_time'
3358
-
3359
- assert_no_difference('Journal.count') do
3360
- put :update,
3361
- :id => 1,
3362
- :issue => {:notes => notes},
3363
- :time_entry => {"comments"=>"", "activity_id"=>"", "hours"=>"2z"}
3364
- end
3365
- assert_response :success
3366
- assert_template 'edit'
3367
-
3368
- assert_select_error /Activity cannot be blank/
3369
- assert_select 'textarea[name=?]', 'issue[notes]', :text => notes
3370
- assert_select 'input[name=?][value=?]', 'time_entry[hours]', '2z'
3371
- end
3372
-
3373
- def test_put_update_with_invalid_spent_time_comments_only
3374
- @request.session[:user_id] = 2
3375
- notes = 'Note added by IssuesControllerTest#test_post_edit_with_invalid_spent_time'
3376
-
3377
- assert_no_difference('Journal.count') do
3378
- put :update,
3379
- :id => 1,
3380
- :issue => {:notes => notes},
3381
- :time_entry => {"comments"=>"this is my comment", "activity_id"=>"", "hours"=>""}
3382
- end
3383
- assert_response :success
3384
- assert_template 'edit'
3385
-
3386
- assert_select_error /Activity cannot be blank/
3387
- assert_select_error /Hours cannot be blank/
3388
- assert_select 'textarea[name=?]', 'issue[notes]', :text => notes
3389
- assert_select 'input[name=?][value=?]', 'time_entry[comments]', 'this is my comment'
3390
- end
3391
-
3392
- def test_put_update_should_allow_fixed_version_to_be_set_to_a_subproject
3393
- issue = Issue.find(2)
3394
- @request.session[:user_id] = 2
3395
-
3396
- put :update,
3397
- :id => issue.id,
3398
- :issue => {
3399
- :fixed_version_id => 4
3400
- }
3401
-
3402
- assert_response :redirect
3403
- issue.reload
3404
- assert_equal 4, issue.fixed_version_id
3405
- assert_not_equal issue.project_id, issue.fixed_version.project_id
3406
- end
3407
-
3408
- def test_put_update_should_redirect_back_using_the_back_url_parameter
3409
- issue = Issue.find(2)
3410
- @request.session[:user_id] = 2
3411
-
3412
- put :update,
3413
- :id => issue.id,
3414
- :issue => {
3415
- :fixed_version_id => 4
3416
- },
3417
- :back_url => '/issues'
3418
-
3419
- assert_response :redirect
3420
- assert_redirected_to '/issues'
3421
- end
3422
-
3423
- def test_put_update_should_not_redirect_back_using_the_back_url_parameter_off_the_host
3424
- issue = Issue.find(2)
3425
- @request.session[:user_id] = 2
3426
-
3427
- put :update,
3428
- :id => issue.id,
3429
- :issue => {
3430
- :fixed_version_id => 4
3431
- },
3432
- :back_url => 'http://google.com'
3433
-
3434
- assert_response :redirect
3435
- assert_redirected_to :controller => 'issues', :action => 'show', :id => issue.id
3436
- end
3437
-
3438
- def test_get_bulk_edit
3439
- @request.session[:user_id] = 2
3440
- get :bulk_edit, :ids => [1, 3]
3441
- assert_response :success
3442
- assert_template 'bulk_edit'
3443
-
3444
- assert_select 'ul#bulk-selection' do
3445
- assert_select 'li', 2
3446
- assert_select 'li a', :text => 'Bug #1'
3447
- end
3448
-
3449
- assert_select 'form#bulk_edit_form[action=?]', '/issues/bulk_update' do
3450
- assert_select 'input[name=?]', 'ids[]', 2
3451
- assert_select 'input[name=?][value="1"][type=hidden]', 'ids[]'
3452
-
3453
- assert_select 'select[name=?]', 'issue[project_id]'
3454
- assert_select 'input[name=?]', 'issue[parent_issue_id]'
3455
-
3456
- # Project specific custom field, date type
3457
- field = CustomField.find(9)
3458
- assert !field.is_for_all?
3459
- assert_equal 'date', field.field_format
3460
- assert_select 'input[name=?]', 'issue[custom_field_values][9]'
3461
-
3462
- # System wide custom field
3463
- assert CustomField.find(1).is_for_all?
3464
- assert_select 'select[name=?]', 'issue[custom_field_values][1]'
3465
-
3466
- # Be sure we don't display inactive IssuePriorities
3467
- assert ! IssuePriority.find(15).active?
3468
- assert_select 'select[name=?]', 'issue[priority_id]' do
3469
- assert_select 'option[value="15"]', 0
3470
- end
3471
- end
3472
- end
3473
-
3474
- def test_get_bulk_edit_on_different_projects
3475
- @request.session[:user_id] = 2
3476
- get :bulk_edit, :ids => [1, 2, 6]
3477
- assert_response :success
3478
- assert_template 'bulk_edit'
3479
-
3480
- # Can not set issues from different projects as children of an issue
3481
- assert_select 'input[name=?]', 'issue[parent_issue_id]', 0
3482
-
3483
- # Project specific custom field, date type
3484
- field = CustomField.find(9)
3485
- assert !field.is_for_all?
3486
- assert !field.project_ids.include?(Issue.find(6).project_id)
3487
- assert_select 'input[name=?]', 'issue[custom_field_values][9]', 0
3488
- end
3489
-
3490
- def test_get_bulk_edit_with_user_custom_field
3491
- field = IssueCustomField.create!(:name => 'Tester', :field_format => 'user', :is_for_all => true, :tracker_ids => [1,2,3])
3492
-
3493
- @request.session[:user_id] = 2
3494
- get :bulk_edit, :ids => [1, 2]
3495
- assert_response :success
3496
- assert_template 'bulk_edit'
3497
-
3498
- assert_select 'select.user_cf[name=?]', "issue[custom_field_values][#{field.id}]" do
3499
- assert_select 'option', Project.find(1).users.count + 2 # "no change" + "none" options
3500
- end
3501
- end
3502
-
3503
- def test_get_bulk_edit_with_version_custom_field
3504
- field = IssueCustomField.create!(:name => 'Affected version', :field_format => 'version', :is_for_all => true, :tracker_ids => [1,2,3])
3505
-
3506
- @request.session[:user_id] = 2
3507
- get :bulk_edit, :ids => [1, 2]
3508
- assert_response :success
3509
- assert_template 'bulk_edit'
3510
-
3511
- assert_select 'select.version_cf[name=?]', "issue[custom_field_values][#{field.id}]" do
3512
- assert_select 'option', Project.find(1).shared_versions.count + 2 # "no change" + "none" options
3513
- end
3514
- end
3515
-
3516
- def test_get_bulk_edit_with_multi_custom_field
3517
- field = CustomField.find(1)
3518
- field.update_attribute :multiple, true
3519
-
3520
- @request.session[:user_id] = 2
3521
- get :bulk_edit, :ids => [1, 3]
3522
- assert_response :success
3523
- assert_template 'bulk_edit'
3524
-
3525
- assert_select 'select[name=?]', 'issue[custom_field_values][1][]' do
3526
- assert_select 'option', field.possible_values.size + 1 # "none" options
3527
- end
3528
- end
3529
-
3530
- def test_bulk_edit_should_propose_to_clear_text_custom_fields
3531
- @request.session[:user_id] = 2
3532
- get :bulk_edit, :ids => [1, 3]
3533
- assert_select 'input[name=?][value=?]', 'issue[custom_field_values][2]', '__none__'
3534
- end
3535
-
3536
- def test_bulk_edit_should_only_propose_statuses_allowed_for_all_issues
3537
- WorkflowTransition.delete_all
3538
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 1,
3539
- :old_status_id => 1, :new_status_id => 1)
3540
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 1,
3541
- :old_status_id => 1, :new_status_id => 3)
3542
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 1,
3543
- :old_status_id => 1, :new_status_id => 4)
3544
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 2,
3545
- :old_status_id => 2, :new_status_id => 1)
3546
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 2,
3547
- :old_status_id => 2, :new_status_id => 3)
3548
- WorkflowTransition.create!(:role_id => 1, :tracker_id => 2,
3549
- :old_status_id => 2, :new_status_id => 5)
3550
- @request.session[:user_id] = 2
3551
- get :bulk_edit, :ids => [1, 2]
3552
-
3553
- assert_response :success
3554
- statuses = assigns(:available_statuses)
3555
- assert_not_nil statuses
3556
- assert_equal [1, 3], statuses.map(&:id).sort
3557
-
3558
- assert_select 'select[name=?]', 'issue[status_id]' do
3559
- assert_select 'option', 3 # 2 statuses + "no change" option
3560
- end
3561
- end
3562
-
3563
- def test_bulk_edit_should_propose_target_project_open_shared_versions
3564
- @request.session[:user_id] = 2
3565
- post :bulk_edit, :ids => [1, 2, 6], :issue => {:project_id => 1}
3566
- assert_response :success
3567
- assert_template 'bulk_edit'
3568
- assert_equal Project.find(1).shared_versions.open.to_a.sort, assigns(:versions).sort
3569
-
3570
- assert_select 'select[name=?]', 'issue[fixed_version_id]' do
3571
- assert_select 'option', :text => '2.0'
3572
- end
3573
- end
3574
-
3575
- def test_bulk_edit_should_propose_target_project_categories
3576
- @request.session[:user_id] = 2
3577
- post :bulk_edit, :ids => [1, 2, 6], :issue => {:project_id => 1}
3578
- assert_response :success
3579
- assert_template 'bulk_edit'
3580
- assert_equal Project.find(1).issue_categories.sort, assigns(:categories).sort
3581
-
3582
- assert_select 'select[name=?]', 'issue[category_id]' do
3583
- assert_select 'option', :text => 'Recipes'
3584
- end
3585
- end
3586
-
3587
- def test_bulk_edit_should_only_propose_issues_trackers_custom_fields
3588
- IssueCustomField.delete_all
3589
- field = IssueCustomField.generate!(:tracker_ids => [1], :is_for_all => true)
3590
- IssueCustomField.generate!(:tracker_ids => [2], :is_for_all => true)
3591
- @request.session[:user_id] = 2
3592
-
3593
- issue_ids = Issue.where(:project_id => 1, :tracker_id => 1).limit(2).ids
3594
- get :bulk_edit, :ids => issue_ids
3595
- assert_equal [field], assigns(:custom_fields)
3596
- end
3597
-
3598
- def test_bulk_update
3599
- @request.session[:user_id] = 2
3600
- # update issues priority
3601
- post :bulk_update, :ids => [1, 2], :notes => 'Bulk editing',
3602
- :issue => {:priority_id => 7,
3603
- :assigned_to_id => '',
3604
- :custom_field_values => {'2' => ''}}
3605
-
3606
- assert_response 302
3607
- # check that the issues were updated
3608
- assert_equal [7, 7], Issue.where(:id =>[1, 2]).collect {|i| i.priority.id}
3609
-
3610
- issue = Issue.find(1)
3611
- journal = issue.journals.reorder('created_on DESC').first
3612
- assert_equal '125', issue.custom_value_for(2).value
3613
- assert_equal 'Bulk editing', journal.notes
3614
- assert_equal 1, journal.details.size
3615
- end
3616
-
3617
- def test_bulk_update_with_group_assignee
3618
- group = Group.find(11)
3619
- project = Project.find(1)
3620
- project.members << Member.new(:principal => group, :roles => [Role.givable.first])
3621
-
3622
- @request.session[:user_id] = 2
3623
- # update issues assignee
3624
- post :bulk_update, :ids => [1, 2], :notes => 'Bulk editing',
3625
- :issue => {:priority_id => '',
3626
- :assigned_to_id => group.id,
3627
- :custom_field_values => {'2' => ''}}
3628
-
3629
- assert_response 302
3630
- assert_equal [group, group], Issue.where(:id => [1, 2]).collect {|i| i.assigned_to}
3631
- end
3632
-
3633
- def test_bulk_update_on_different_projects
3634
- @request.session[:user_id] = 2
3635
- # update issues priority
3636
- post :bulk_update, :ids => [1, 2, 6], :notes => 'Bulk editing',
3637
- :issue => {:priority_id => 7,
3638
- :assigned_to_id => '',
3639
- :custom_field_values => {'2' => ''}}
3640
-
3641
- assert_response 302
3642
- # check that the issues were updated
3643
- assert_equal [7, 7, 7], Issue.find([1,2,6]).map(&:priority_id)
3644
-
3645
- issue = Issue.find(1)
3646
- journal = issue.journals.reorder('created_on DESC').first
3647
- assert_equal '125', issue.custom_value_for(2).value
3648
- assert_equal 'Bulk editing', journal.notes
3649
- assert_equal 1, journal.details.size
3650
- end
3651
-
3652
- def test_bulk_update_on_different_projects_without_rights
3653
- @request.session[:user_id] = 3
3654
- user = User.find(3)
3655
- action = { :controller => "issues", :action => "bulk_update" }
3656
- assert user.allowed_to?(action, Issue.find(1).project)
3657
- assert ! user.allowed_to?(action, Issue.find(6).project)
3658
- post :bulk_update, :ids => [1, 6], :notes => 'Bulk should fail',
3659
- :issue => {:priority_id => 7,
3660
- :assigned_to_id => '',
3661
- :custom_field_values => {'2' => ''}}
3662
- assert_response 403
3663
- assert_not_equal "Bulk should fail", Journal.last.notes
3664
- end
3665
-
3666
- def test_bullk_update_should_send_a_notification
3667
- @request.session[:user_id] = 2
3668
- ActionMailer::Base.deliveries.clear
3669
- with_settings :notified_events => %w(issue_updated) do
3670
- post(:bulk_update,
3671
- {
3672
- :ids => [1, 2],
3673
- :notes => 'Bulk editing',
3674
- :issue => {
3675
- :priority_id => 7,
3676
- :assigned_to_id => '',
3677
- :custom_field_values => {'2' => ''}
3678
- }
3679
- })
3680
- assert_response 302
3681
- assert_equal 2, ActionMailer::Base.deliveries.size
3682
- end
3683
- end
3684
-
3685
- def test_bulk_update_project
3686
- @request.session[:user_id] = 2
3687
- post :bulk_update, :ids => [1, 2], :issue => {:project_id => '2'}
3688
- assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
3689
- # Issues moved to project 2
3690
- assert_equal 2, Issue.find(1).project_id
3691
- assert_equal 2, Issue.find(2).project_id
3692
- # No tracker change
3693
- assert_equal 1, Issue.find(1).tracker_id
3694
- assert_equal 2, Issue.find(2).tracker_id
3695
- end
3696
-
3697
- def test_bulk_update_project_on_single_issue_should_follow_when_needed
3698
- @request.session[:user_id] = 2
3699
- post :bulk_update, :id => 1, :issue => {:project_id => '2'}, :follow => '1'
3700
- assert_redirected_to '/issues/1'
3701
- end
3702
-
3703
- def test_bulk_update_project_on_multiple_issues_should_follow_when_needed
3704
- @request.session[:user_id] = 2
3705
- post :bulk_update, :id => [1, 2], :issue => {:project_id => '2'}, :follow => '1'
3706
- assert_redirected_to '/projects/onlinestore/issues'
3707
- end
3708
-
3709
- def test_bulk_update_tracker
3710
- @request.session[:user_id] = 2
3711
- post :bulk_update, :ids => [1, 2], :issue => {:tracker_id => '2'}
3712
- assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
3713
- assert_equal 2, Issue.find(1).tracker_id
3714
- assert_equal 2, Issue.find(2).tracker_id
3715
- end
3716
-
3717
- def test_bulk_update_status
3718
- @request.session[:user_id] = 2
3719
- # update issues priority
3720
- post :bulk_update, :ids => [1, 2], :notes => 'Bulk editing status',
3721
- :issue => {:priority_id => '',
3722
- :assigned_to_id => '',
3723
- :status_id => '5'}
3724
-
3725
- assert_response 302
3726
- issue = Issue.find(1)
3727
- assert issue.closed?
3728
- end
3729
-
3730
- def test_bulk_update_priority
3731
- @request.session[:user_id] = 2
3732
- post :bulk_update, :ids => [1, 2], :issue => {:priority_id => 6}
3733
-
3734
- assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
3735
- assert_equal 6, Issue.find(1).priority_id
3736
- assert_equal 6, Issue.find(2).priority_id
3737
- end
3738
-
3739
- def test_bulk_update_with_notes
3740
- @request.session[:user_id] = 2
3741
- post :bulk_update, :ids => [1, 2], :notes => 'Moving two issues'
3742
-
3743
- assert_redirected_to :controller => 'issues', :action => 'index', :project_id => 'ecookbook'
3744
- assert_equal 'Moving two issues', Issue.find(1).journals.sort_by(&:id).last.notes
3745
- assert_equal 'Moving two issues', Issue.find(2).journals.sort_by(&:id).last.notes
3746
- end
3747
-
3748
- def test_bulk_update_parent_id
3749
- IssueRelation.delete_all
3750
- @request.session[:user_id] = 2
3751
- post :bulk_update, :ids => [1, 3],
3752
- :notes => 'Bulk editing parent',
3753
- :issue => {:priority_id => '', :assigned_to_id => '',
3754
- :status_id => '', :parent_issue_id => '2'}
3755
- assert_response 302
3756
- parent = Issue.find(2)
3757
- assert_equal parent.id, Issue.find(1).parent_id
3758
- assert_equal parent.id, Issue.find(3).parent_id
3759
- assert_equal [1, 3], parent.children.collect(&:id).sort
3760
- end
3761
-
3762
- def test_bulk_update_custom_field
3763
- @request.session[:user_id] = 2
3764
- # update issues priority
3765
- post :bulk_update, :ids => [1, 2], :notes => 'Bulk editing custom field',
3766
- :issue => {:priority_id => '',
3767
- :assigned_to_id => '',
3768
- :custom_field_values => {'2' => '777'}}
3769
-
3770
- assert_response 302
3771
-
3772
- issue = Issue.find(1)
3773
- journal = issue.journals.reorder('created_on DESC').first
3774
- assert_equal '777', issue.custom_value_for(2).value
3775
- assert_equal 1, journal.details.size
3776
- assert_equal '125', journal.details.first.old_value
3777
- assert_equal '777', journal.details.first.value
3778
- end
3779
-
3780
- def test_bulk_update_custom_field_to_blank
3781
- @request.session[:user_id] = 2
3782
- post :bulk_update, :ids => [1, 3], :notes => 'Bulk editing custom field',
3783
- :issue => {:priority_id => '',
3784
- :assigned_to_id => '',
3785
- :custom_field_values => {'1' => '__none__'}}
3786
- assert_response 302
3787
- assert_equal '', Issue.find(1).custom_field_value(1)
3788
- assert_equal '', Issue.find(3).custom_field_value(1)
3789
- end
3790
-
3791
- def test_bulk_update_multi_custom_field
3792
- field = CustomField.find(1)
3793
- field.update_attribute :multiple, true
3794
-
3795
- @request.session[:user_id] = 2
3796
- post :bulk_update, :ids => [1, 2, 3], :notes => 'Bulk editing multi custom field',
3797
- :issue => {:priority_id => '',
3798
- :assigned_to_id => '',
3799
- :custom_field_values => {'1' => ['MySQL', 'Oracle']}}
3800
-
3801
- assert_response 302
3802
-
3803
- assert_equal ['MySQL', 'Oracle'], Issue.find(1).custom_field_value(1).sort
3804
- assert_equal ['MySQL', 'Oracle'], Issue.find(3).custom_field_value(1).sort
3805
- # the custom field is not associated with the issue tracker
3806
- assert_nil Issue.find(2).custom_field_value(1)
3807
- end
3808
-
3809
- def test_bulk_update_multi_custom_field_to_blank
3810
- field = CustomField.find(1)
3811
- field.update_attribute :multiple, true
3812
-
3813
- @request.session[:user_id] = 2
3814
- post :bulk_update, :ids => [1, 3], :notes => 'Bulk editing multi custom field',
3815
- :issue => {:priority_id => '',
3816
- :assigned_to_id => '',
3817
- :custom_field_values => {'1' => ['__none__']}}
3818
- assert_response 302
3819
- assert_equal [''], Issue.find(1).custom_field_value(1)
3820
- assert_equal [''], Issue.find(3).custom_field_value(1)
3821
- end
3822
-
3823
- def test_bulk_update_unassign
3824
- assert_not_nil Issue.find(2).assigned_to
3825
- @request.session[:user_id] = 2
3826
- # unassign issues
3827
- post :bulk_update, :ids => [1, 2], :notes => 'Bulk unassigning', :issue => {:assigned_to_id => 'none'}
3828
- assert_response 302
3829
- # check that the issues were updated
3830
- assert_nil Issue.find(2).assigned_to
3831
- end
3832
-
3833
- def test_post_bulk_update_should_allow_fixed_version_to_be_set_to_a_subproject
3834
- @request.session[:user_id] = 2
3835
-
3836
- post :bulk_update, :ids => [1,2], :issue => {:fixed_version_id => 4}
3837
-
3838
- assert_response :redirect
3839
- issues = Issue.find([1,2])
3840
- issues.each do |issue|
3841
- assert_equal 4, issue.fixed_version_id
3842
- assert_not_equal issue.project_id, issue.fixed_version.project_id
3843
- end
3844
- end
3845
-
3846
- def test_post_bulk_update_should_redirect_back_using_the_back_url_parameter
3847
- @request.session[:user_id] = 2
3848
- post :bulk_update, :ids => [1,2], :back_url => '/issues'
3849
-
3850
- assert_response :redirect
3851
- assert_redirected_to '/issues'
3852
- end
3853
-
3854
- def test_post_bulk_update_should_not_redirect_back_using_the_back_url_parameter_off_the_host
3855
- @request.session[:user_id] = 2
3856
- post :bulk_update, :ids => [1,2], :back_url => 'http://google.com'
3857
-
3858
- assert_response :redirect
3859
- assert_redirected_to :controller => 'issues', :action => 'index', :project_id => Project.find(1).identifier
3860
- end
3861
-
3862
- def test_bulk_update_with_all_failures_should_show_errors
3863
- @request.session[:user_id] = 2
3864
- post :bulk_update, :ids => [1, 2], :issue => {:start_date => 'foo'}
3865
-
3866
- assert_response :success
3867
- assert_template 'bulk_edit'
3868
- assert_select '#errorExplanation span', :text => 'Failed to save 2 issue(s) on 2 selected: #1, #2.'
3869
- assert_select '#errorExplanation ul li', :text => 'Start date is not a valid date: #1, #2'
3870
-
3871
- assert_equal [1, 2], assigns[:issues].map(&:id)
3872
- end
3873
-
3874
- def test_bulk_update_with_some_failures_should_show_errors
3875
- issue1 = Issue.generate!(:start_date => '2013-05-12')
3876
- issue2 = Issue.generate!(:start_date => '2013-05-15')
3877
- issue3 = Issue.generate!
3878
- @request.session[:user_id] = 2
3879
- post :bulk_update, :ids => [issue1.id, issue2.id, issue3.id],
3880
- :issue => {:due_date => '2013-05-01'}
3881
- assert_response :success
3882
- assert_template 'bulk_edit'
3883
- assert_select '#errorExplanation span',
3884
- :text => "Failed to save 2 issue(s) on 3 selected: ##{issue1.id}, ##{issue2.id}."
3885
- assert_select '#errorExplanation ul li',
3886
- :text => "Due date must be greater than start date: ##{issue1.id}, ##{issue2.id}"
3887
- assert_equal [issue1.id, issue2.id], assigns[:issues].map(&:id)
3888
- end
3889
-
3890
- def test_bulk_update_with_failure_should_preserved_form_values
3891
- @request.session[:user_id] = 2
3892
- post :bulk_update, :ids => [1, 2], :issue => {:tracker_id => '2', :start_date => 'foo'}
3893
-
3894
- assert_response :success
3895
- assert_template 'bulk_edit'
3896
- assert_select 'select[name=?]', 'issue[tracker_id]' do
3897
- assert_select 'option[value="2"][selected=selected]'
3898
- end
3899
- assert_select 'input[name=?][value=?]', 'issue[start_date]', 'foo'
3900
- end
3901
-
3902
- def test_get_bulk_copy
3903
- @request.session[:user_id] = 2
3904
- get :bulk_edit, :ids => [1, 2, 3], :copy => '1'
3905
- assert_response :success
3906
- assert_template 'bulk_edit'
3907
-
3908
- issues = assigns(:issues)
3909
- assert_not_nil issues
3910
- assert_equal [1, 2, 3], issues.map(&:id).sort
3911
-
3912
- assert_select 'select[name=?]', 'issue[project_id]' do
3913
- assert_select 'option[value=""]'
3914
- end
3915
- assert_select 'input[name=copy_attachments]'
3916
- end
3917
-
3918
- def test_get_bulk_copy_without_add_issues_permission_should_not_propose_current_project_as_target
3919
- user = setup_user_with_copy_but_not_add_permission
3920
- @request.session[:user_id] = user.id
3921
-
3922
- get :bulk_edit, :ids => [1, 2, 3], :copy => '1'
3923
- assert_response :success
3924
- assert_template 'bulk_edit'
3925
-
3926
- assert_select 'select[name=?]', 'issue[project_id]' do
3927
- assert_select 'option[value=""]', 0
3928
- assert_select 'option[value="2"]'
3929
- end
3930
- end
3931
-
3932
- def test_bulk_copy_to_another_project
3933
- @request.session[:user_id] = 2
3934
- assert_difference 'Issue.count', 2 do
3935
- assert_no_difference 'Project.find(1).issues.count' do
3936
- post :bulk_update, :ids => [1, 2], :issue => {:project_id => '2'}, :copy => '1'
3937
- end
3938
- end
3939
- assert_redirected_to '/projects/ecookbook/issues'
3940
-
3941
- copies = Issue.order('id DESC').limit(issues.size)
3942
- copies.each do |copy|
3943
- assert_equal 2, copy.project_id
3944
- end
3945
- end
3946
-
3947
- def test_bulk_copy_without_add_issues_permission_should_be_allowed_on_project_with_permission
3948
- user = setup_user_with_copy_but_not_add_permission
3949
- @request.session[:user_id] = user.id
3950
-
3951
- assert_difference 'Issue.count', 3 do
3952
- post :bulk_update, :ids => [1, 2, 3], :issue => {:project_id => '2'}, :copy => '1'
3953
- assert_response 302
3954
- end
3955
- end
3956
-
3957
- def test_bulk_copy_on_same_project_without_add_issues_permission_should_be_denied
3958
- user = setup_user_with_copy_but_not_add_permission
3959
- @request.session[:user_id] = user.id
3960
-
3961
- post :bulk_update, :ids => [1, 2, 3], :issue => {:project_id => ''}, :copy => '1'
3962
- assert_response 403
3963
- end
3964
-
3965
- def test_bulk_copy_on_different_project_without_add_issues_permission_should_be_denied
3966
- user = setup_user_with_copy_but_not_add_permission
3967
- @request.session[:user_id] = user.id
3968
-
3969
- post :bulk_update, :ids => [1, 2, 3], :issue => {:project_id => '1'}, :copy => '1'
3970
- assert_response 403
3971
- end
3972
-
3973
- def test_bulk_copy_should_allow_not_changing_the_issue_attributes
3974
- @request.session[:user_id] = 2
3975
- issues = [
3976
- Issue.create!(:project_id => 1, :tracker_id => 1, :status_id => 1,
3977
- :priority_id => 2, :subject => 'issue 1', :author_id => 1,
3978
- :assigned_to_id => nil),
3979
- Issue.create!(:project_id => 2, :tracker_id => 3, :status_id => 2,
3980
- :priority_id => 1, :subject => 'issue 2', :author_id => 2,
3981
- :assigned_to_id => 3)
3982
- ]
3983
- assert_difference 'Issue.count', issues.size do
3984
- post :bulk_update, :ids => issues.map(&:id), :copy => '1',
3985
- :issue => {
3986
- :project_id => '', :tracker_id => '', :assigned_to_id => '',
3987
- :status_id => '', :start_date => '', :due_date => ''
3988
- }
3989
- end
3990
-
3991
- copies = Issue.order('id DESC').limit(issues.size)
3992
- issues.each do |orig|
3993
- copy = copies.detect {|c| c.subject == orig.subject}
3994
- assert_not_nil copy
3995
- assert_equal orig.project_id, copy.project_id
3996
- assert_equal orig.tracker_id, copy.tracker_id
3997
- assert_equal orig.status_id, copy.status_id
3998
- assert_equal orig.assigned_to_id, copy.assigned_to_id
3999
- assert_equal orig.priority_id, copy.priority_id
4000
- end
4001
- end
4002
-
4003
- def test_bulk_copy_should_allow_changing_the_issue_attributes
4004
- # Fixes random test failure with Mysql
4005
- # where Issue.where(:project_id => 2).limit(2).order('id desc')
4006
- # doesn't return the expected results
4007
- Issue.delete_all("project_id=2")
4008
-
4009
- @request.session[:user_id] = 2
4010
- assert_difference 'Issue.count', 2 do
4011
- assert_no_difference 'Project.find(1).issues.count' do
4012
- post :bulk_update, :ids => [1, 2], :copy => '1',
4013
- :issue => {
4014
- :project_id => '2', :tracker_id => '', :assigned_to_id => '4',
4015
- :status_id => '1', :start_date => '2009-12-01', :due_date => '2009-12-31'
4016
- }
4017
- end
4018
- end
4019
-
4020
- copied_issues = Issue.where(:project_id => 2).limit(2).order('id desc').to_a
4021
- assert_equal 2, copied_issues.size
4022
- copied_issues.each do |issue|
4023
- assert_equal 2, issue.project_id, "Project is incorrect"
4024
- assert_equal 4, issue.assigned_to_id, "Assigned to is incorrect"
4025
- assert_equal 1, issue.status_id, "Status is incorrect"
4026
- assert_equal '2009-12-01', issue.start_date.to_s, "Start date is incorrect"
4027
- assert_equal '2009-12-31', issue.due_date.to_s, "Due date is incorrect"
4028
- end
4029
- end
4030
-
4031
- def test_bulk_copy_should_allow_adding_a_note
4032
- @request.session[:user_id] = 2
4033
- assert_difference 'Issue.count', 1 do
4034
- post :bulk_update, :ids => [1], :copy => '1',
4035
- :notes => 'Copying one issue',
4036
- :issue => {
4037
- :project_id => '', :tracker_id => '', :assigned_to_id => '4',
4038
- :status_id => '3', :start_date => '2009-12-01', :due_date => '2009-12-31'
4039
- }
4040
- end
4041
- issue = Issue.order('id DESC').first
4042
- assert_equal 1, issue.journals.size
4043
- journal = issue.journals.first
4044
- assert_equal 'Copying one issue', journal.notes
4045
- end
4046
-
4047
- def test_bulk_copy_should_allow_not_copying_the_attachments
4048
- attachment_count = Issue.find(3).attachments.size
4049
- assert attachment_count > 0
4050
- @request.session[:user_id] = 2
4051
-
4052
- assert_difference 'Issue.count', 1 do
4053
- assert_no_difference 'Attachment.count' do
4054
- post :bulk_update, :ids => [3], :copy => '1', :copy_attachments => '0',
4055
- :issue => {
4056
- :project_id => ''
4057
- }
4058
- end
4059
- end
4060
- end
4061
-
4062
- def test_bulk_copy_should_allow_copying_the_attachments
4063
- attachment_count = Issue.find(3).attachments.size
4064
- assert attachment_count > 0
4065
- @request.session[:user_id] = 2
4066
-
4067
- assert_difference 'Issue.count', 1 do
4068
- assert_difference 'Attachment.count', attachment_count do
4069
- post :bulk_update, :ids => [3], :copy => '1', :copy_attachments => '1',
4070
- :issue => {
4071
- :project_id => ''
4072
- }
4073
- end
4074
- end
4075
- end
4076
-
4077
- def test_bulk_copy_should_add_relations_with_copied_issues
4078
- @request.session[:user_id] = 2
4079
-
4080
- assert_difference 'Issue.count', 2 do
4081
- assert_difference 'IssueRelation.count', 2 do
4082
- post :bulk_update, :ids => [1, 3], :copy => '1', :link_copy => '1',
4083
- :issue => {
4084
- :project_id => '1'
4085
- }
4086
- end
4087
- end
4088
- end
4089
-
4090
- def test_bulk_copy_should_allow_not_copying_the_subtasks
4091
- issue = Issue.generate_with_descendants!
4092
- @request.session[:user_id] = 2
4093
-
4094
- assert_difference 'Issue.count', 1 do
4095
- post :bulk_update, :ids => [issue.id], :copy => '1', :copy_subtasks => '0',
4096
- :issue => {
4097
- :project_id => ''
4098
- }
4099
- end
4100
- end
4101
-
4102
- def test_bulk_copy_should_allow_copying_the_subtasks
4103
- issue = Issue.generate_with_descendants!
4104
- count = issue.descendants.count
4105
- @request.session[:user_id] = 2
4106
-
4107
- assert_difference 'Issue.count', count+1 do
4108
- post :bulk_update, :ids => [issue.id], :copy => '1', :copy_subtasks => '1',
4109
- :issue => {
4110
- :project_id => ''
4111
- }
4112
- end
4113
- copy = Issue.where(:parent_id => nil).order("id DESC").first
4114
- assert_equal count, copy.descendants.count
4115
- end
4116
-
4117
- def test_bulk_copy_should_not_copy_selected_subtasks_twice
4118
- issue = Issue.generate_with_descendants!
4119
- count = issue.descendants.count
4120
- @request.session[:user_id] = 2
4121
-
4122
- assert_difference 'Issue.count', count+1 do
4123
- post :bulk_update, :ids => issue.self_and_descendants.map(&:id), :copy => '1', :copy_subtasks => '1',
4124
- :issue => {
4125
- :project_id => ''
4126
- }
4127
- end
4128
- copy = Issue.where(:parent_id => nil).order("id DESC").first
4129
- assert_equal count, copy.descendants.count
4130
- end
4131
-
4132
- def test_bulk_copy_to_another_project_should_follow_when_needed
4133
- @request.session[:user_id] = 2
4134
- post :bulk_update, :ids => [1], :copy => '1', :issue => {:project_id => 2}, :follow => '1'
4135
- issue = Issue.order('id DESC').first
4136
- assert_redirected_to :controller => 'issues', :action => 'show', :id => issue
4137
- end
4138
-
4139
- def test_bulk_copy_with_all_failures_should_display_errors
4140
- @request.session[:user_id] = 2
4141
- post :bulk_update, :ids => [1, 2], :copy => '1', :issue => {:start_date => 'foo'}
4142
-
4143
- assert_response :success
4144
- end
4145
-
4146
- def test_destroy_issue_with_no_time_entries
4147
- assert_nil TimeEntry.find_by_issue_id(2)
4148
- @request.session[:user_id] = 2
4149
-
4150
- assert_difference 'Issue.count', -1 do
4151
- delete :destroy, :id => 2
4152
- end
4153
- assert_redirected_to :action => 'index', :project_id => 'ecookbook'
4154
- assert_nil Issue.find_by_id(2)
4155
- end
4156
-
4157
- def test_destroy_issues_with_time_entries
4158
- @request.session[:user_id] = 2
4159
-
4160
- assert_no_difference 'Issue.count' do
4161
- delete :destroy, :ids => [1, 3]
4162
- end
4163
- assert_response :success
4164
- assert_template 'destroy'
4165
- assert_not_nil assigns(:hours)
4166
- assert Issue.find_by_id(1) && Issue.find_by_id(3)
4167
-
4168
- assert_select 'form' do
4169
- assert_select 'input[name=_method][value=delete]'
4170
- end
4171
- end
4172
-
4173
- def test_destroy_issues_and_destroy_time_entries
4174
- @request.session[:user_id] = 2
4175
-
4176
- assert_difference 'Issue.count', -2 do
4177
- assert_difference 'TimeEntry.count', -3 do
4178
- delete :destroy, :ids => [1, 3], :todo => 'destroy'
4179
- end
4180
- end
4181
- assert_redirected_to :action => 'index', :project_id => 'ecookbook'
4182
- assert !(Issue.find_by_id(1) || Issue.find_by_id(3))
4183
- assert_nil TimeEntry.find_by_id([1, 2])
4184
- end
4185
-
4186
- def test_destroy_issues_and_assign_time_entries_to_project
4187
- @request.session[:user_id] = 2
4188
-
4189
- assert_difference 'Issue.count', -2 do
4190
- assert_no_difference 'TimeEntry.count' do
4191
- delete :destroy, :ids => [1, 3], :todo => 'nullify'
4192
- end
4193
- end
4194
- assert_redirected_to :action => 'index', :project_id => 'ecookbook'
4195
- assert !(Issue.find_by_id(1) || Issue.find_by_id(3))
4196
- assert_nil TimeEntry.find(1).issue_id
4197
- assert_nil TimeEntry.find(2).issue_id
4198
- end
4199
-
4200
- def test_destroy_issues_and_reassign_time_entries_to_another_issue
4201
- @request.session[:user_id] = 2
4202
-
4203
- assert_difference 'Issue.count', -2 do
4204
- assert_no_difference 'TimeEntry.count' do
4205
- delete :destroy, :ids => [1, 3], :todo => 'reassign', :reassign_to_id => 2
4206
- end
4207
- end
4208
- assert_redirected_to :action => 'index', :project_id => 'ecookbook'
4209
- assert !(Issue.find_by_id(1) || Issue.find_by_id(3))
4210
- assert_equal 2, TimeEntry.find(1).issue_id
4211
- assert_equal 2, TimeEntry.find(2).issue_id
4212
- end
4213
-
4214
- def test_destroy_issues_and_reassign_time_entries_to_an_invalid_issue_should_fail
4215
- @request.session[:user_id] = 2
4216
-
4217
- assert_no_difference 'Issue.count' do
4218
- assert_no_difference 'TimeEntry.count' do
4219
- # try to reassign time to an issue of another project
4220
- delete :destroy, :ids => [1, 3], :todo => 'reassign', :reassign_to_id => 4
4221
- end
4222
- end
4223
- assert_response :success
4224
- assert_template 'destroy'
4225
- end
4226
-
4227
- def test_destroy_issues_from_different_projects
4228
- @request.session[:user_id] = 2
4229
-
4230
- assert_difference 'Issue.count', -3 do
4231
- delete :destroy, :ids => [1, 2, 6], :todo => 'destroy'
4232
- end
4233
- assert_redirected_to :controller => 'issues', :action => 'index'
4234
- assert !(Issue.find_by_id(1) || Issue.find_by_id(2) || Issue.find_by_id(6))
4235
- end
4236
-
4237
- def test_destroy_parent_and_child_issues
4238
- parent = Issue.create!(:project_id => 1, :author_id => 1, :tracker_id => 1, :subject => 'Parent Issue')
4239
- child = Issue.create!(:project_id => 1, :author_id => 1, :tracker_id => 1, :subject => 'Child Issue', :parent_issue_id => parent.id)
4240
- assert child.is_descendant_of?(parent.reload)
4241
-
4242
- @request.session[:user_id] = 2
4243
- assert_difference 'Issue.count', -2 do
4244
- delete :destroy, :ids => [parent.id, child.id], :todo => 'destroy'
4245
- end
4246
- assert_response 302
4247
- end
4248
-
4249
- def test_destroy_invalid_should_respond_with_404
4250
- @request.session[:user_id] = 2
4251
- assert_no_difference 'Issue.count' do
4252
- delete :destroy, :id => 999
4253
- end
4254
- assert_response 404
4255
- end
4256
-
4257
- def test_default_search_scope
4258
- get :index
4259
-
4260
- assert_select 'div#quick-search form' do
4261
- assert_select 'input[name=issues][value="1"][type=hidden]'
4262
- end
4263
- end
4264
-
4265
- def setup_user_with_copy_but_not_add_permission
4266
- Role.all.each {|r| r.remove_permission! :add_issues}
4267
- Role.find_by_name('Manager').add_permission! :add_issues
4268
- user = User.generate!
4269
- User.add_to_project(user, Project.find(1), Role.find_by_name('Developer'))
4270
- User.add_to_project(user, Project.find(2), Role.find_by_name('Manager'))
4271
- user
4272
- end
4273
- end