Files
sure/test/controllers/settings/preferences_controller_test.rb
Ang Wei Feng (Ted) 60929cdee0 feat: add currency management for families with enabled currencies (#1419)
* feat: add currency management for families with enabled currencies

* feat: update currency selection logic and improve accessibility

* feat: update currency preferences to use group moniker in titles

---------

Signed-off-by: Ang Wei Feng (Ted) <hello@tedawf.com>
Signed-off-by: Juan José Mata <juanjo.mata@gmail.com>
Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
2026-04-13 19:53:04 +02:00

25 lines
634 B
Ruby

require "test_helper"
class Settings::PreferencesControllerTest < ActionDispatch::IntegrationTest
setup do
sign_in users(:family_admin)
end
test "get" do
get settings_preferences_url
assert_response :success
end
test "group moniker uses group currencies copy and hides legacy currency field" do
users(:family_admin).family.update!(moniker: "Group")
get settings_preferences_url
assert_response :success
assert_includes response.body, "Group Currencies"
assert_includes response.body, "your group"
assert_select "select[name='user[family_attributes][currency]']", count: 0
end
end