@@ -87,14 +87,6 module ObjectHelpers | |||
|
87 | 87 | source |
|
88 | 88 | end |
|
89 | 89 | |
|
90 | # Generate the default Query | |
|
91 | def Query.generate_default!(attributes={}) | |
|
92 | query = Query.new(attributes) | |
|
93 | query.name = '_' if query.name.blank? | |
|
94 | query.save! | |
|
95 | query | |
|
96 | end | |
|
97 | ||
|
98 | 90 | # Generate an issue for a project, using it's trackers |
|
99 | 91 | def Issue.generate_for_project!(project, attributes={}) |
|
100 | 92 | issue = Issue.new(attributes) do |issue| |
@@ -33,7 +33,7 class Redmine::Helpers::GanttHelperTest < ActionView::TestCase | |||
|
33 | 33 | @project = project |
|
34 | 34 | @gantt = Redmine::Helpers::Gantt.new(options) |
|
35 | 35 | @gantt.project = @project |
|
36 |
@gantt.query = Query. |
|
|
36 | @gantt.query = Query.create!(:project => @project, :name => 'Gantt') | |
|
37 | 37 | @gantt.view = self |
|
38 | 38 | @gantt.instance_variable_set('@date_from', options[:date_from] || 2.weeks.ago.to_date) |
|
39 | 39 | @gantt.instance_variable_set('@date_to', options[:date_to] || 2.weeks.from_now.to_date) |
General Comments 0
You need to be logged in to leave comments.
Login now