diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-12-02 08:36:14 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2018-12-02 08:36:14 +0000 |
commit | 3c423df203476429a3875f18d307992c3f9693bc (patch) | |
tree | 8788f25584ed117daf9d62fad751392707001703 /test/object_helpers.rb | |
parent | 0e9837e4d15bd8d90e0da4d030d95d9bf56020d9 (diff) | |
download | redmine-3c423df203476429a3875f18d307992c3f9693bc.tar.gz redmine-3c423df203476429a3875f18d307992c3f9693bc.zip |
Don't send notifications when using Issue.generate! in tests in order to speed up tests.
git-svn-id: http://svn.redmine.org/redmine/trunk@17680 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'test/object_helpers.rb')
-rw-r--r-- | test/object_helpers.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/test/object_helpers.rb b/test/object_helpers.rb index b7d2eac93..8dd8df558 100644 --- a/test/object_helpers.rb +++ b/test/object_helpers.rb @@ -87,8 +87,9 @@ module ObjectHelpers end # Generates an unsaved Issue + # Doesn't send notifications by default, use :notify => true to send them def Issue.generate(attributes={}) - issue = Issue.new(attributes) + issue = Issue.new(attributes.reverse_merge(:notify => false)) issue.project ||= Project.find(1) issue.tracker ||= issue.project.trackers.first issue.subject = 'Generated' if issue.subject.blank? @@ -98,6 +99,7 @@ module ObjectHelpers end # Generates a saved Issue + # Doesn't send notifications by default, use :notify => true to send them def Issue.generate!(attributes={}, &block) issue = Issue.generate(attributes, &block) issue.save! |