Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

add a test for a tab param

Oliver Güntherbf4233766dfd
diff --git a/spec/controllers/custom_styles_controller_spec.rb b/spec/controllers/custom_styles_controller_spec.rb
index e7da4876c32..faf2601e3a5 100644
--- a/spec/controllers/custom_styles_controller_spec.rb
+++ b/spec/controllers/custom_styles_controller_spec.rb
@@ -566,6 +566,13 @@ RSpec.describe CustomStylesController do
expect(DesignColor.count).to eq(0)
expect(response).to redirect_to action: :show
end
+
+ context "when setting a tab to route to" do
+ it "redirects to that tab" do
+ post :update_colors, params: { tab: :branding, design_colors: [{ "primary-button-color" => "#110000" }] }
+ expect(response).to redirect_to(action: :show, tab: :branding)
+ end
+ end
end
end