canvas-lms/spec/models/account
Jeremy Stanley ec7b756395 allow default help link text to be edited
fixes CNVS-39004

this was allowed before, but was disallowed because it broke I18n
(see CNVS-37038). we will use the same technique we used with
the menu name in CNVS-38421 to allow link text and subtext to be
customized, or localized if it isn't customized; namely, we will
not store the saved value if it matches the default value from
the code in the locale of the user saving it.

test plan:
 0. enable help links by doing the following in a Rails console:

    Setting.set("show_feedback_link", "true")

 1. still in the Rails console, clear existing custom link
    definitions, if present, as follows:

    a = Account.default
    a.settings.delete(:custom_help_links)
    a.save!

 2. start your server with RAILS_LOAD_ALL_LOCALES=1

 3. go to /accounts/1/settings and edit the text of one of
    the default help links (note the URL is still immutable).
    Save account settings.

 4. change your language to Spanish.

 5. go back to /accounts/1/settings, and the link text you
    edited should be what you set it to. the other links
    should be displayed in Spanish.

 6. edit another link and save.

 7. switch back to English. the two links you edited should
    remain edited; the others should now show in English.

Change-Id: I44bd407c57f88166562b7e0745560133e78ad4ea
Reviewed-on: https://gerrit.instructure.com/126948
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2017-09-25 15:21:26 +00:00
..
help_links_spec.rb allow default help link text to be edited 2017-09-25 15:21:26 +00:00