Sha256: a2bd551953ff9211c53d9e1731bc090d9aa6dc744a07beaaf401fb480ac1b3ac
Contents?: true
Size: 1.15 KB
Versions: 9
Compression:
Stored size: 1.15 KB
Contents
require 'test_helper' class PostsControllerTest < ActionController::TestCase def setup @post = Post.create!(title: "test", content: "content", info: "info") end def teardown @post.destroy rescue nil end test "include javascripts" do get :index assert_select "script", Regexp.new(Regexp.escape(%q!CKEDITOR.replace('test_area');!)) end test "pass text_area with options" do get :index assert_select "textarea[name='content']", "Ckeditor" assert_select "script", Regexp.new(Regexp.escape(%q!CKEDITOR.replace('content', {"toolbar":"Easy"});!)) end test "form builder helper" do get :new assert_select "textarea[name='post[content]']", "" assert_select "script", Regexp.new(Regexp.escape(%q!CKEDITOR.replace('post_content', {"width":800,"height":400});!)) assert_select "textarea[name='post[info]']", "Defaults info content" assert_select "script", Regexp.new(Regexp.escape(%q!CKEDITOR.replace('new_info_content');!)) end test "text_area value" do get :edit, id: @post.id assert_select "textarea[name='post[content]']", "content" assert_select "textarea[name='post[info]']", "info" end end
Version data entries
9 entries across 9 versions & 2 rubygems