Project

General

Profile

Defect #33562 ยป fix-unreachable-test-methods.patch

Go MAEDA, 2020-06-06 08:55

View differences:

test/helpers/application_helper_test.rb
assert_nil render_if_exist(:partial => 'non_exist_partial')
end
def test_export_csv_encoding_select_tag_should_return_nil_when_general_csv_encoding_is_UTF8
with_locale 'az' do
assert_equal l(:general_csv_encoding), 'UTF-8'
assert_nil export_csv_encoding_select_tag
end
end
def test_export_csv_encoding_select_tag_should_have_two_option_when_general_csv_encoding_is_not_UTF8
with_locale 'en' do
assert_not_equal l(:general_csv_encoding), 'UTF-8'
result = export_csv_encoding_select_tag
assert_select_in result, "option[selected='selected'][value=#{l(:general_csv_encoding)}]", :text => l(:general_csv_encoding)
assert_select_in result, "option[value='UTF-8']", :text => 'UTF-8'
end
end
private
def wiki_links_with_special_characters
......
:class => "wiki-page new"),
}
end
def test_export_csv_encoding_select_tag_should_return_nil_when_general_csv_encoding_is_UTF8
with_locale 'az' do
assert_equal l(:general_csv_encoding), 'UTF-8'
assert_nil export_csv_encoding_select_tag
end
end
def test_export_csv_encoding_select_tag_should_have_two_option_when_general_csv_encoding_is_not_UTF8
with_locale 'en' do
assert_not_equal l(:general_csv_encoding), 'UTF-8'
result = export_csv_encoding_select_tag
assert_select_in result, "option[selected='selected'][value=#{l(:general_csv_encoding)}]", :text => l(:general_csv_encoding)
assert_select_in result, "option[value='UTF-8']", :text => 'UTF-8'
end
end
end
    (1-1/1)