mirror of
https://github.com/we-promise/sure.git
synced 2026-04-16 18:44:13 +00:00
* 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>
25 lines
634 B
Ruby
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
|