semanticui-generators 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ffaf623c7f590dd8604a34bd4d629066e34ed966
|
4
|
+
data.tar.gz: e937dbf15a39641707bb240a459247c468783cb8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e1e6ab5d949c04684c3f5bb1611f59b2b37bbb457dbf04354389d5a6624803dc7c2c1f3615ba8560ed40e2cb2f657b11607346c47ed35b20ceb3f78f9739fcbb
|
7
|
+
data.tar.gz: fb8980ed5985d73afe5d3e6bdb24827238bd127781842d41e814459c2ec436e6ca78b95c1989d5db815bb72a0f87b3f74dd60c208c87377199acc36e5fcecfb7
|
data/lib/generators/semanticui/install/templates/lib/templates/test_unit/scaffold/functional_test.rb
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
<% module_namespacing do -%>
|
4
|
+
class <%= controller_class_name %>ControllerTest < ActionDispatch::IntegrationTest
|
5
|
+
<%- if mountable_engine? -%>
|
6
|
+
include Engine.routes.url_helpers
|
7
|
+
|
8
|
+
<%- end -%>
|
9
|
+
setup do
|
10
|
+
@<%= singular_table_name %> = <%= fixture_name %>(:one)
|
11
|
+
end
|
12
|
+
|
13
|
+
test "should get index" do
|
14
|
+
get <%= index_helper %>_url
|
15
|
+
assert_response :success
|
16
|
+
end
|
17
|
+
|
18
|
+
test "should get new" do
|
19
|
+
get <%= new_helper %>
|
20
|
+
assert_response :success
|
21
|
+
end
|
22
|
+
|
23
|
+
test "should create <%= singular_table_name %>" do
|
24
|
+
assert_difference('<%= class_name %>.count') do
|
25
|
+
post <%= index_helper %>_url, xhr: true, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> }
|
26
|
+
end
|
27
|
+
|
28
|
+
assert_response :success
|
29
|
+
end
|
30
|
+
|
31
|
+
test "should show <%= singular_table_name %>" do
|
32
|
+
get <%= show_helper %>
|
33
|
+
assert_response :success
|
34
|
+
end
|
35
|
+
|
36
|
+
test "should get edit" do
|
37
|
+
get <%= edit_helper %>
|
38
|
+
assert_response :success
|
39
|
+
end
|
40
|
+
|
41
|
+
test "should update <%= singular_table_name %>" do
|
42
|
+
patch <%= show_helper %>, xhr: true, params: { <%= "#{singular_table_name}: { #{attributes_hash} }" %> }
|
43
|
+
assert_response :success
|
44
|
+
end
|
45
|
+
|
46
|
+
test "should destroy <%= singular_table_name %>" do
|
47
|
+
assert_difference('<%= class_name %>.count', -1) do
|
48
|
+
delete <%= show_helper %>, xhr: true
|
49
|
+
end
|
50
|
+
|
51
|
+
assert_response :success
|
52
|
+
end
|
53
|
+
end
|
54
|
+
<% end -%>
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semanticui-generators
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Matt Lins
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- lib/generators/semanticui/install/templates/lib/templates/erb/scaffold/show.html.erb
|
82
82
|
- lib/generators/semanticui/install/templates/lib/templates/erb/scaffold/update.js.erb
|
83
83
|
- lib/generators/semanticui/install/templates/lib/templates/rails/scaffold_controller/controller.rb
|
84
|
+
- lib/generators/semanticui/install/templates/lib/templates/test_unit/scaffold/functional_test.rb
|
84
85
|
- lib/semanticui-generators.rb
|
85
86
|
- lib/semanticui/generators/version.rb
|
86
87
|
- semanticui-generators.gemspec
|