Files
nairobi/spec/components/admin/stats/sdg_component_spec.rb
Javi Martín 772be11525 Fix budget investments chart in admin stats
The JavaScript required to display the chart wasn't loaded on the admin
stats page.

We're not adding a test because we're going to move the budgets graph to
a different page on the pull request containing this commit.

Note we're changing the "Go back" link, since using a turbolinks refresh
broke this link when using the Chromium browser. Besides, there was an
inconsistency where some of the "Go back" links in admin stats pointed
to the admin stats page but other links pointed to `:back`.
2024-05-09 14:28:31 +02:00

12 lines
312 B
Ruby

require "rails_helper"
describe Admin::Stats::SDGComponent do
include Rails.application.routes.url_helpers
it "renders a links to go back to the admin stats index" do
render_inline Admin::Stats::SDGComponent.new(SDG::Goal.all)
expect(page).to have_link "Go back", href: admin_stats_path
end
end