hackatime/test/models/user_test.rb
Mahad Kalam 44777ad644
Data export fix + async exports + more tests (#989)
* Fix data export + Capybara

* Continue?

* A ton of system tests :D + test cleanup

* More system tests

* Add placeholder keys for tests?

* Get rid of the double-query!

* Speed up CI Chrome setup by avoiding snap installs

* Pin CI Chrome version to reduce system test flakiness

* Stabilize integrations settings system test interaction
2026-02-21 11:28:21 +00:00

32 lines
710 B
Ruby

require "test_helper"
class UserTest < ActiveSupport::TestCase
test "theme defaults to gruvbox dark" do
user = User.new
assert_equal "gruvbox_dark", user.theme
end
test "theme options include all supported themes in order" do
values = User.theme_options.map { |option| option[:value] }
assert_equal %w[
standard
neon
catppuccin_mocha
catppuccin_iced_latte
gruvbox_dark
github_dark
github_light
nord
rose
rose_pine_dawn
], values
end
test "theme metadata falls back to default for unknown themes" do
metadata = User.theme_metadata("not-a-real-theme")
assert_equal "gruvbox_dark", metadata[:value]
end
end