Added test for RichTextAreaInput

This commit is contained in:
Terry S 2019-03-15 17:39:07 +00:00
parent b5117ccd47
commit 3b3ab24e28
1 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1,15 @@
# frozen_string_literal: true
# encoding: UTF-8
require 'test_helper'
class RichTextAreaInputTest < ActionView::TestCase
test 'input generates a text area for text attributes' do
with_input_for @user, :description, :text
assert_select 'textarea.text#user_description'
end
test 'input generates a text area for text attributes that accept placeholder' do
with_input_for @user, :description, :text, placeholder: 'Put in some text'
assert_select 'textarea.text[placeholder="Put in some text"]'
end
end