]> source.dussan.org Git - redmine.git/commitdiff
Removed Query.generate_default! helper.
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 22 Apr 2012 12:46:43 +0000 (12:46 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 22 Apr 2012 12:46:43 +0000 (12:46 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9472 e93f8b46-1217-0410-a6f0-8f06a7374b81

test/object_helpers.rb
test/unit/lib/redmine/helpers/gantt_test.rb

index eb2c87e67e5d7aaa0fd0cd1ea7f218c51fa3c851..7be05606f3cf0d2e828ffef04d9b00d9ee248743 100644 (file)
@@ -87,14 +87,6 @@ module ObjectHelpers
     source
   end
 
-  # Generate the default Query
-  def Query.generate_default!(attributes={})
-    query = Query.new(attributes)
-    query.name = '_' if query.name.blank?
-    query.save!
-    query
-  end
-
   # Generate an issue for a project, using it's trackers
   def Issue.generate_for_project!(project, attributes={})
     issue = Issue.new(attributes) do |issue|
index b4f201a2be8bc055ed9c2f88a470faa874e6b82a..ace931ba105fd30e3c08cd8cf4d0a1e63780dd8d 100644 (file)
@@ -33,7 +33,7 @@ class Redmine::Helpers::GanttHelperTest < ActionView::TestCase
     @project = project
     @gantt = Redmine::Helpers::Gantt.new(options)
     @gantt.project = @project
-    @gantt.query = Query.generate_default!(:project => @project)
+    @gantt.query = Query.create!(:project => @project, :name => 'Gantt')
     @gantt.view = self
     @gantt.instance_variable_set('@date_from', options[:date_from] || 2.weeks.ago.to_date)
     @gantt.instance_variable_set('@date_to', options[:date_to] || 2.weeks.from_now.to_date)