Feature #20620 ยป 20620.patch
app/views/layouts/base.html.erb | ||
---|---|---|
17 | 17 |
<!-- page specific tags --> |
18 | 18 |
<%= yield :header_tags -%> |
19 | 19 |
</head> |
20 |
<body class="<%= body_css_classes %>"> |
|
20 |
<body class="<%= body_css_classes %>" data-text-formatting="<%= Setting.text_formatting %>">
|
|
21 | 21 |
<%= call_hook :view_layouts_base_body_top %> |
22 | 22 |
<div id="wrapper"> |
23 | 23 |
test/functional/welcome_controller_test.rb | ||
---|---|---|
117 | 117 |
assert_select 'body.textarea-proportional' |
118 | 118 |
end |
119 | 119 | |
120 |
def test_data_text_setting_attribute |
|
121 |
formats = %w(textile common_mark) |
|
122 |
formats.each do |format| |
|
123 |
with_settings text_formatting: format do |
|
124 |
get :index |
|
125 |
assert_select 'body[data-text-formatting=?]', format |
|
126 |
end |
|
127 |
end |
|
128 |
end |
|
129 | ||
120 | 130 |
def test_logout_link_should_post |
121 | 131 |
@request.session[:user_id] = 2 |
122 | 132 |