From 02568801e6e34ee1ccbb825c6a10dfab83d1663e Mon Sep 17 00:00:00 2001 From: Guillermo Iguaran Date: Fri, 25 Nov 2016 23:42:29 -0500 Subject: Add UJS tests --- .../test/ujs/views/layouts/application.html.erb | 40 ++++++++++++++++++++++ actionview/test/ujs/views/tests/index.html.erb | 25 ++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 actionview/test/ujs/views/layouts/application.html.erb create mode 100644 actionview/test/ujs/views/tests/index.html.erb (limited to 'actionview/test/ujs/views') diff --git a/actionview/test/ujs/views/layouts/application.html.erb b/actionview/test/ujs/views/layouts/application.html.erb new file mode 100644 index 0000000000..74fa3bd06d --- /dev/null +++ b/actionview/test/ujs/views/layouts/application.html.erb @@ -0,0 +1,40 @@ + + + + <%= @title %> + + + + <%= script_tag jquery_src %> + + <%= script_tag "/rails-ujs.js" %> + + + + <%= yield %> + + diff --git a/actionview/test/ujs/views/tests/index.html.erb b/actionview/test/ujs/views/tests/index.html.erb new file mode 100644 index 0000000000..393a5ee235 --- /dev/null +++ b/actionview/test/ujs/views/tests/index.html.erb @@ -0,0 +1,25 @@ +<% @title = "jquery-ujs test" %> + +<%= test_to 'data-confirm', 'data-remote', 'data-disable', 'data-disable-with', 'call-remote', 'call-remote-callbacks', 'data-method', 'override', 'csrf-refresh', 'csrf-token' %> + +

<%= @title %>

+
+ CDN: + <%= cdn_link 'jquery' %> • + <%= cdn_link 'googleapis' %> +
+
+ jQuery version: + + <% jquery_versions.each do |v| %> + <%= ' • ' if v != jquery_versions.first %> + <%= jquery_link v %> + <% end %> + <%= (' • ' + jquery_link('edge')) if File.exist?(Rails.root + '/public/vendor/jquery.js') %> +
+

+
+

+
    + +
    -- cgit v1.2.3