whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@apache.org
Subject [whimsy] 01/05: add some tests
Date Tue, 05 Jun 2018 23:19:36 GMT
This is an automated email from the ASF dual-hosted git repository.

rubys pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git

commit 0e1b8adc07fc291956111248ddc731282f972b62
Author: Sam Ruby <rubys@intertwingly.net>
AuthorDate: Mon Jun 4 09:13:55 2018 -0400

    add some tests
---
 www/board/agenda/spec/reflow_spec.rb | 41 ++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

diff --git a/www/board/agenda/spec/reflow_spec.rb b/www/board/agenda/spec/reflow_spec.rb
new file mode 100644
index 0000000..56199ec
--- /dev/null
+++ b/www/board/agenda/spec/reflow_spec.rb
@@ -0,0 +1,41 @@
+#
+# component tests for client side forms
+#
+
+require_relative 'spec_helper'
+require_relative 'vue_server'
+
+describe "reflow", type: :feature, server: :vue do
+  #
+  # Comment form
+  #
+  describe "incubator rules" do
+    it "handles ordered lists" do
+      on_vue_server do
+        class TestReflow < Vue
+          def render
+            _ Flow.text("1. a\n2. b")
+          end
+        end
+
+        Vue.renderResponse(TestReflow, response)
+      end
+
+      expect(page.body).to eq "1. a\n2. b"
+    end
+
+    it "handles questions and colons" do
+      on_vue_server do
+        class TestReflow < Vue
+          def render
+            _ Flow.text("a?\nb:\nc", '', true)
+          end
+        end
+
+        Vue.renderResponse(TestReflow, response)
+      end
+
+      expect(page.body).to eq "a?\nb:\nc"
+    end
+  end
+end

-- 
To stop receiving notification emails like this one, please contact
rubys@apache.org.

Mime
View raw message