14519: Test exposing the regression
authorLucas Di Pentima <ldipentima@veritasgenetics.com>
Wed, 21 Nov 2018 22:31:51 +0000 (19:31 -0300)
committerLucas Di Pentima <ldipentima@veritasgenetics.com>
Mon, 26 Nov 2018 18:40:33 +0000 (15:40 -0300)
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima@veritasgenetics.com>

apps/workbench/test/controllers/projects_controller_test.rb

index 3522745fe4cc0bca3da001e12c805fe516640482..21b3361c1612d8df920217b0a43775b9f372a9de 100644 (file)
@@ -351,6 +351,24 @@ class ProjectsControllerTest < ActionController::TestCase
     assert_includes @response.body, 'Textile description with unsafe script tag alert("Hello there").'
   end
 
+  # Tests #14519
+  test "textile table on description renders as table html markup" do
+    use_token :active
+    project = api_fixture('groups')['aproject']
+    textile_table = <<EOT
+table(table table-striped table-condensed).
+|_. First Header |_. Second Header |
+|Content Cell |Content Cell |
+|Content Cell |Content Cell |
+EOT
+    found = Group.find(project['uuid'])
+    found.description = textile_table
+    found.save!
+    get(:show, {id: project['uuid']}, session_for(:active))
+    assert_includes @response.body, '<th>First Header'
+    assert_includes @response.body, '<td>Content Cell'
+  end
+
   test "find a project and edit description to textile description with link to object" do
     project = api_fixture('groups')['aproject']
     use_token :active