##// END OF EJS Templates
Removed Query.generate_default! helper....
Jean-Philippe Lang -
r9338:0fad78f53f54
parent child
Show More
@@ -87,14 +87,6 module ObjectHelpers
87 source
87 source
88 end
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 # Generate an issue for a project, using it's trackers
90 # Generate an issue for a project, using it's trackers
99 def Issue.generate_for_project!(project, attributes={})
91 def Issue.generate_for_project!(project, attributes={})
100 issue = Issue.new(attributes) do |issue|
92 issue = Issue.new(attributes) do |issue|
@@ -33,7 +33,7 class Redmine::Helpers::GanttHelperTest < ActionView::TestCase
33 @project = project
33 @project = project
34 @gantt = Redmine::Helpers::Gantt.new(options)
34 @gantt = Redmine::Helpers::Gantt.new(options)
35 @gantt.project = @project
35 @gantt.project = @project
36 @gantt.query = Query.generate_default!(:project => @project)
36 @gantt.query = Query.create!(:project => @project, :name => 'Gantt')
37 @gantt.view = self
37 @gantt.view = self
38 @gantt.instance_variable_set('@date_from', options[:date_from] || 2.weeks.ago.to_date)
38 @gantt.instance_variable_set('@date_from', options[:date_from] || 2.weeks.ago.to_date)
39 @gantt.instance_variable_set('@date_to', options[:date_to] || 2.weeks.from_now.to_date)
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