Fix specs
This commit is contained in:
@@ -193,7 +193,7 @@ feature "Polls" do
|
||||
end
|
||||
|
||||
page.driver.browser.switch_to.window page.driver.browser.window_handles.last do
|
||||
expect(page).to have_current_path(results_poll_path(poll))
|
||||
expect(page).to have_current_path(results_proposal_poll_path(proposal, poll))
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -1024,9 +1024,14 @@ describe Proposal do
|
||||
describe "#send_new_actions_notification_on_create" do
|
||||
|
||||
before do
|
||||
Setting["dashboard.emails"] = true
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
||||
after do
|
||||
Setting["dashboard.emails"] = nil
|
||||
end
|
||||
|
||||
it "send notification after create when there are new actived actions" do
|
||||
create(:dashboard_action, :proposed_action, :active, day_offset: 0, published_proposal: false)
|
||||
create(:dashboard_action, :resource, :active, day_offset: 0, published_proposal: false)
|
||||
@@ -1050,9 +1055,14 @@ describe Proposal do
|
||||
describe "#send_new_actions_notification_on_published" do
|
||||
|
||||
before do
|
||||
Setting["dashboard.emails"] = true
|
||||
ActionMailer::Base.deliveries.clear
|
||||
end
|
||||
|
||||
after do
|
||||
Setting["dashboard.emails"] = nil
|
||||
end
|
||||
|
||||
it "send notification after published when there are new actived actions" do
|
||||
create(:dashboard_action, :proposed_action, :active, day_offset: 0, published_proposal: true)
|
||||
create(:dashboard_action, :resource, :active, day_offset: 0, published_proposal: true)
|
||||
|
||||
Reference in New Issue
Block a user