* Rename SiteConfig * More renaming * Update spec * Update mandatory settings mapping * More renaming * e2e test fixes * You have a rename, and you have a rename * Spec fix * More changes * Temporarily disable specs * After-merge update * Undo rename for migration * undo rename of DUS * Fix DUS * Fix merge problem * Remove redundant DUS * Fix specs * Remove unused code * Change wrong class name * More cleanup * Re-add missing values to constant * Fix constant * Fix spec * Remove obsolete fields * Add accidentally removed field * Update spec * Move methods from Settings::General to ForemInstance * Remove unneeded model * Change mentions of 'site config'
21 lines
773 B
Ruby
21 lines
773 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "dashboards/show.html.erb", type: :view do
|
|
before do
|
|
stub_template "dashboards/_actions_mobile.html.erb" => "stubbed content"
|
|
stub_template "dashboards/_analytics.html.erb" => "stubbed content"
|
|
stub_template "dashboards/_actions.html.erb" => "stubbed content"
|
|
|
|
allow(Images::Optimizer).to receive(:imgproxy_enabled?).and_return(true)
|
|
allow(Settings::General).to receive(:mascot_image_url).and_return("https://i.imgur.com/fKYKgo4.png")
|
|
end
|
|
|
|
context "when using Imgproxy" do
|
|
it "renders mascot image properly" do
|
|
assign(:user, create(:user))
|
|
assign(:articles, [])
|
|
render
|
|
expect(rendered).to match(%r{/w:300/mb:500000/aHR0cHM6Ly9pLmlt/Z3VyLmNvbS9mS1lL/Z280LnBuZw})
|
|
end
|
|
end
|
|
end
|