Disable contact model log in test env

#206
This commit is contained in:
Artur Beljajev 2016-10-24 16:03:43 +03:00
parent c43b54a30a
commit d27594603b

View file

@ -212,7 +212,7 @@ class Contact < ActiveRecord::Base
contact.destroy contact.destroy
counter.next counter.next
STDOUT << "#{Time.zone.now.utc} Contact.destroy_orphans: ##{contact.id} (#{contact.name})\n" STDOUT << "#{Time.zone.now.utc} Contact.destroy_orphans: ##{contact.id} (#{contact.name})\n" unless Rails.env.test?
end end
STDOUT << "#{Time.zone.now.utc} - Successfully destroyed #{counter} orphaned contacts\n" unless Rails.env.test? STDOUT << "#{Time.zone.now.utc} - Successfully destroyed #{counter} orphaned contacts\n" unless Rails.env.test?