diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2014-10-22 17:37:16 +0000 |
commit | 2d1866d966d94c688f9cb87c5bf3f096dffac844 (patch) | |
tree | 7a733c1cc51448ab69b3f892285305dbfb0ae15e /test/object_helpers.rb | |
parent | a6ec78a4dc658e3517ed682792016b6530458696 (diff) | |
download | redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.tar.gz redmine-2d1866d966d94c688f9cb87c5bf3f096dffac844.zip |
Merged rails-4.1 branch (#14534).
git-svn-id: http://svn.redmine.org/redmine/trunk@13482 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r-- | test/object_helpers.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb index 4e4a9fba3..1469e6aff 100644 --- a/test/object_helpers.rb +++ b/test/object_helpers.rb @@ -14,7 +14,7 @@ module ObjectHelpers def User.add_to_project(user, project, roles=nil) roles = Role.find(1) if roles.nil? - roles = [roles] unless roles.is_a?(Array) + roles = [roles] if roles.is_a?(Role) Member.create!(:principal => user, :project => project, :roles => roles) end @@ -178,14 +178,6 @@ module ObjectHelpers changeset.save! changeset end - - def Query.generate!(attributes={}) - query = new(attributes) - query.name = "Generated query" if query.name.blank? - query.user ||= User.find(1) - query.save! - query - end end module IssueObjectHelpers |