Revision baabd5ae
Added by Shimon Shtein over 8 years ago
test/unit/helpers/layout_helper_test.rb | ||
---|---|---|
require 'test_helper'
|
||
|
||
class LayoutHelperTest < ActionView::TestCase
|
||
include LayoutHelper
|
||
test "alert should be closable" do
|
||
result = alert(:close => true)
|
||
assert_include result, 'alert-dismissable'
|
||
... | ... | |
test "table css classes should return the regular classes for table plus the added classes" do
|
||
assert_equal table_css_classes("test-class"),"table table-bordered table-striped table-condensed test-class"
|
||
end
|
||
|
||
context '#select_f' do
|
||
test 'include_blank works with #to_s as retreival method' do
|
||
form_for User.new do |f|
|
||
fields_for :user_mail_notifications do |notifications|
|
||
values = ['one', :two]
|
||
html = select_f(notifications, :interval, values, :to_s, :to_sym, { :include_blank => _('No emails') }, {})
|
||
assert_match /one/, html
|
||
assert_no_match /to_s/, html
|
||
end
|
||
end
|
||
end
|
||
end
|
||
end
|
Also available in: Unified diff
Fixes #11665 - Removed to_s function from OpenStruct instance