Allow editing and resetting of all admin setting strings
This commit is contained in:
@@ -30,9 +30,7 @@ RSpec.describe 'Admin/global settings', type: :feature do
|
||||
visit admin_settings_services_path(params: { s: "ejabberd" })
|
||||
|
||||
expect(page).to have_content("Enable ejabberd integration")
|
||||
expect(page).to have_field("API URL",
|
||||
with: "http://xmpp.example.com/api",
|
||||
disabled: true)
|
||||
expect(page).to have_field("API URL", with: "http://xmpp.example.com/api")
|
||||
end
|
||||
|
||||
scenario "Disable ejabberd integration" do
|
||||
@@ -67,5 +65,16 @@ RSpec.describe 'Admin/global settings', type: :feature do
|
||||
expect(page).to_not have_checked_field("setting[remotestorage_enabled]")
|
||||
expect(page).to_not have_field("Storage URL", disabled: true)
|
||||
end
|
||||
|
||||
scenario "Resettable fields" do
|
||||
visit admin_settings_services_path(params: { s: "ejabberd" })
|
||||
expect(page).to have_field("API URL", with: "http://xmpp.example.com/api")
|
||||
expect(page).to_not have_css('input#setting_ejabberd_api_url+button')
|
||||
|
||||
Setting.ejabberd_api_url = "http://example.com/foo"
|
||||
visit admin_settings_services_path(params: { s: "ejabberd" })
|
||||
expect(page).to have_field("API URL", with: "http://example.com/foo")
|
||||
expect(page).to have_css('input#setting_ejabberd_api_url+button')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user