Skip to content

Commit

Permalink
Fix theme spec
Browse files Browse the repository at this point in the history
  • Loading branch information
pixeldesu committed Aug 6, 2024
1 parent 5d38699 commit f782e32
Showing 1 changed file with 23 additions and 16 deletions.
39 changes: 23 additions & 16 deletions spec/lib/use_case/data_export/theme_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -13,39 +14,45 @@

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

it "returns the theme as json" 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",
},
},
)
Expand Down

0 comments on commit f782e32

Please sign in to comment.