Fix specs

This commit is contained in:
decabeza
2019-04-25 12:28:24 +02:00
parent dfbdc0568c
commit 20f505ab7c
3 changed files with 16 additions and 1 deletions

View File

@@ -8,9 +8,14 @@ describe "Dashboards Rake" do
before do
Rake.application.rake_require "tasks/dashboards"
Rake::Task.define_task(:environment)
Setting["dashboard.emails"] = true
ActionMailer::Base.deliveries.clear
end
after do
Setting["dashboard.emails"] = nil
end
let :run_rake_task do
Rake::Task["dashboards:send_notifications"].reenable
Rake.application.invoke_task "dashboards:send_notifications"