Fix theme spec

This commit is contained in:
Andreas Nedbal 2024-08-06 22:50:32 +02:00 committed by Andreas Nedbal
parent 5d38699ba6
commit f782e32f30
1 changed files with 23 additions and 16 deletions

View File

@ -2,7 +2,8 @@
require "rails_helper"
describe UseCase::DataExport::Theme, :data_export do
describe UseCase::DataExport::Theme,
:data_export do
include ActiveSupport::Testing::TimeHelpers
context "when user doesn't have a theme" do
@ -13,8 +14,14 @@ describe UseCase::DataExport::Theme, :data_export do
context "when user has a theme" do
let!(:theme) do
travel_to(Time.utc(2022, 12, 10, 13, 37, 42)) do
FactoryBot.create(:theme, user:)
travel_to(Time.utc(2022,
12,
10,
13,
37,
42,)) do
FactoryBot.create(:theme,
user:,)
end
end
@ -22,30 +29,30 @@ describe UseCase::DataExport::Theme, :data_export do
expect(json_file("theme.json")).to eq(
{
theme: {
background_color: "#f0edf4",
body_text: "#000000",
danger_color: "#dc3545",
background_color: "#c6c5eb",
body_text: "#333333",
danger_color: "#d98b8b",
danger_text: "#ffffff",
dark_color: "#343a40",
dark_color: "#666666",
dark_text: "#eeeeee",
info_color: "#17a2b8",
info_color: "#8bd9d9",
info_text: "#ffffff",
input_color: "#f0edf4",
input_placeholder: "#6c757d",
input_text: "#000000",
input_text: "#666666",
light_color: "#f8f9fa",
light_text: "#000000",
muted_text: "#6c757d",
primary_color: "#5e35b1",
muted_text: "#333333",
primary_color: "#8e8cd8",
primary_text: "#ffffff",
raised_accent: "#f7f7f7",
raised_accent_text: "#000000",
raised_accent_text: "#333333",
raised_background: "#ffffff",
raised_text: "#000000",
success_color: "#28a745",
raised_text: "#333333",
success_color: "#bfd98b",
success_text: "#ffffff",
warning_color: "#ffc107",
warning_text: "#292929",
warning_color: "#d99e8b",
warning_text: "#ffffff",
},
},
)