mirror of
https://github.com/we-promise/sure.git
synced 2026-04-17 11:04:14 +00:00
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>
This commit is contained in:
committed by
GitHub
parent
1aa3c8f007
commit
60929cdee0
@@ -4,8 +4,21 @@ 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
|
||||
|
||||
Reference in New Issue
Block a user