From 3b3ab24e28cd3a3540c62604c66d1dbffda9f7bb Mon Sep 17 00:00:00 2001 From: Terry S Date: Fri, 15 Mar 2019 17:39:07 +0000 Subject: [PATCH] Added test for RichTextAreaInput --- test/inputs/rich_text_area_input_test.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 test/inputs/rich_text_area_input_test.rb diff --git a/test/inputs/rich_text_area_input_test.rb b/test/inputs/rich_text_area_input_test.rb new file mode 100644 index 000000000..15d12a589 --- /dev/null +++ b/test/inputs/rich_text_area_input_test.rb @@ -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