From 2caa04329bbc6d6dd057d99a5dc0253a335a1feb Mon Sep 17 00:00:00 2001 From: Krzysztof Kotlarek Date: Thu, 5 Jun 2025 08:06:56 +0800 Subject: [PATCH] DEV: docs index spec working with core themes (#210) With core themes, the first theme does not have to be the default one. Correlated draft PR with core themes: https://github.com/discourse/discourse/pull/32681 --- spec/system/docs_index_spec.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/spec/system/docs_index_spec.rb b/spec/system/docs_index_spec.rb index 5ceaffc..494e39d 100644 --- a/spec/system/docs_index_spec.rb +++ b/spec/system/docs_index_spec.rb @@ -51,7 +51,9 @@ describe "Discourse Docs | Index", type: :system do context "when the theme modifier serialize_topic_excerpts is true" do before do - ThemeModifierSet.find_by(theme_id: Theme.first.id).update!(serialize_topic_excerpts: true) + ThemeModifierSet.find_by(theme_id: SiteSetting.default_theme_id).update!( + serialize_topic_excerpts: true, + ) Theme.clear_cache! end