Add new param to partial '_setting_table'
When we reuse the partial '_setting_table' to render the 3 types of remote census settings, we need customize setting_name key by default to clarify the information to render. - Add new param 'setting_name' to partial '_setting_table' - Create new setting helper method to use new setting_name param to display a more clarify setting name on table.
This commit is contained in:
@@ -28,4 +28,13 @@ RSpec.describe SettingsHelper, type: :helper do
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
describe "#display_setting_name" do
|
||||
it "returns correct setting_name" do
|
||||
expect(display_setting_name("setting")).to eq("Setting")
|
||||
expect(display_setting_name("remote_census_general_name")).to eq("General Information")
|
||||
expect(display_setting_name("remote_census_request_name")).to eq("Request Data")
|
||||
expect(display_setting_name("remote_census_response_name")).to eq("Response Data")
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user