2011-09-03 16:49:54 +00:00
|
|
|
# encoding: UTF-8
|
|
|
|
require 'test_helper'
|
|
|
|
|
|
|
|
class BooleanInputTest < ActionView::TestCase
|
|
|
|
test 'input should generate a checkbox by default for boolean attributes' do
|
|
|
|
with_input_for @user, :active, :boolean
|
|
|
|
assert_select 'input[type=checkbox].boolean#user_active'
|
|
|
|
assert_select 'input.boolean + label.boolean.optional'
|
|
|
|
end
|
2012-01-26 12:51:12 +00:00
|
|
|
end
|