daredevil 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/daredevil/responder/actions.rb +2 -2
- data/lib/daredevil/version.rb +1 -1
- data/test/dummy/app/controllers/posts_controller.rb +7 -3
- data/test/dummy/app/views/posts/edit.json.jbuilder +4 -0
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +282 -12708
- data/test/post_test.rb +7 -2
- data/test/reports/TEST-DaredevilTest.xml +4 -4
- data/test/reports/TEST-PostJbuilderTest.xml +3 -3
- data/test/reports/TEST-PostTest.xml +9 -7
- metadata +4 -4
- data/test/dummy/log/test.log +0 -5
data/test/post_test.rb
CHANGED
@@ -5,8 +5,8 @@ class PostTest < ActionDispatch::IntegrationTest
|
|
5
5
|
# Must teardown after this test class runs to reset to default
|
6
6
|
setup do
|
7
7
|
Daredevil.config.config.responder_type = :serializers
|
8
|
-
@post = create(:post)
|
9
8
|
@params = { params: { format: :json } }
|
9
|
+
@post = create(:post)
|
10
10
|
end
|
11
11
|
|
12
12
|
teardown do
|
@@ -18,6 +18,11 @@ class PostTest < ActionDispatch::IntegrationTest
|
|
18
18
|
assert_response :success
|
19
19
|
end
|
20
20
|
|
21
|
+
test 'get edit' do
|
22
|
+
get edit_post_url(create(:post)), @params
|
23
|
+
assert_response :success
|
24
|
+
end
|
25
|
+
|
21
26
|
test 'serializer response show' do
|
22
27
|
get post_path(@post), @params
|
23
28
|
r = JSON.parse(response.body)
|
@@ -38,7 +43,7 @@ class PostTest < ActionDispatch::IntegrationTest
|
|
38
43
|
|
39
44
|
test 'rescue RecordNotFound' do
|
40
45
|
assert_nothing_raised do
|
41
|
-
get post_path(
|
46
|
+
get post_path(Post.last.id + 1), @params
|
42
47
|
end
|
43
48
|
|
44
49
|
r = JSON.parse(response.body)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<testsuite time='0.
|
3
|
-
<testcase time='0.
|
2
|
+
<testsuite time='0.004454' skipped='0' failures='0' errors='0' name="DaredevilTest" assertions='3' tests='3'>
|
3
|
+
<testcase time='0.001954' file="test/daredevil_test.rb" name="test_configuration_defaults_to_jbuilder" assertions='1'>
|
4
4
|
</testcase>
|
5
|
-
<testcase time='0.
|
5
|
+
<testcase time='0.001696' file="test/daredevil_test.rb" name="test_it_has_a_gem_version" assertions='1'>
|
6
6
|
</testcase>
|
7
|
-
<testcase time='0.
|
7
|
+
<testcase time='0.000804' file="test/daredevil_test.rb" name="test_Daredevil_is_actually_a_thing" assertions='1'>
|
8
8
|
</testcase>
|
9
9
|
</testsuite>
|
@@ -1,7 +1,7 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<testsuite time='0.
|
3
|
-
<testcase time='0.
|
2
|
+
<testsuite time='0.048476' skipped='0' failures='0' errors='0' name="PostJbuilderTest" assertions='7' tests='2'>
|
3
|
+
<testcase time='0.029491' file="test/post_jbuilder_test.rb" name="test_normal_success_response" assertions='4'>
|
4
4
|
</testcase>
|
5
|
-
<testcase time='0.
|
5
|
+
<testcase time='0.018985' file="test/post_jbuilder_test.rb" name="test_show_response" assertions='3'>
|
6
6
|
</testcase>
|
7
7
|
</testsuite>
|
@@ -1,17 +1,19 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<testsuite time='0.
|
3
|
-
<testcase time='0.
|
2
|
+
<testsuite time='0.644392' skipped='1' failures='0' errors='0' name="PostTest" assertions='21' tests='7'>
|
3
|
+
<testcase time='0.531063' file="test/post_test.rb" name="test_post_create_with_blank_attribute" assertions='8'>
|
4
4
|
</testcase>
|
5
|
-
<testcase time='0.
|
5
|
+
<testcase time='0.008291' file="test/post_test.rb" name="test_rescue_ParameterMissing" assertions='4'>
|
6
|
+
</testcase>
|
7
|
+
<testcase time='0.005285' file="test/post_test.rb" name="test_custom_serializer_response_show" assertions='0'>
|
6
8
|
<skipped type='Minitest::Skip' message="Skipped, no message given">
|
7
9
|
</skipped>
|
8
10
|
</testcase>
|
9
|
-
<testcase time='0.
|
11
|
+
<testcase time='0.041371' file="test/post_test.rb" name="test_rescue_RecordNotFound" assertions='4'>
|
10
12
|
</testcase>
|
11
|
-
<testcase time='0.
|
13
|
+
<testcase time='0.037509' file="test/post_test.rb" name="test_normal_success_response" assertions='1'>
|
12
14
|
</testcase>
|
13
|
-
<testcase time='0.
|
15
|
+
<testcase time='0.010660' file="test/post_test.rb" name="test_get_edit" assertions='1'>
|
14
16
|
</testcase>
|
15
|
-
<testcase time='0.
|
17
|
+
<testcase time='0.010213' file="test/post_test.rb" name="test_serializer_response_show" assertions='3'>
|
16
18
|
</testcase>
|
17
19
|
</testsuite>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: daredevil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin Brown
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08-
|
11
|
+
date: 2017-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- test/dummy/app/serializers/kustom_post_serializer.rb
|
70
70
|
- test/dummy/app/serializers/post_serializer.rb
|
71
71
|
- test/dummy/app/views/posts/_post.json.jbuilder
|
72
|
+
- test/dummy/app/views/posts/edit.json.jbuilder
|
72
73
|
- test/dummy/app/views/posts/index.json.jbuilder
|
73
74
|
- test/dummy/app/views/posts/show.json.jbuilder
|
74
75
|
- test/dummy/bin/bundle
|
@@ -95,7 +96,6 @@ files:
|
|
95
96
|
- test/dummy/db/schema.rb
|
96
97
|
- test/dummy/db/test.sqlite3
|
97
98
|
- test/dummy/log/development.log
|
98
|
-
- test/dummy/log/test.log
|
99
99
|
- test/factories/posts.rb
|
100
100
|
- test/post_jbuilder_test.rb
|
101
101
|
- test/post_test.rb
|
@@ -136,6 +136,7 @@ test_files:
|
|
136
136
|
- test/dummy/app/serializers/kustom_post_serializer.rb
|
137
137
|
- test/dummy/app/serializers/post_serializer.rb
|
138
138
|
- test/dummy/app/views/posts/_post.json.jbuilder
|
139
|
+
- test/dummy/app/views/posts/edit.json.jbuilder
|
139
140
|
- test/dummy/app/views/posts/index.json.jbuilder
|
140
141
|
- test/dummy/app/views/posts/show.json.jbuilder
|
141
142
|
- test/dummy/bin/bundle
|
@@ -162,7 +163,6 @@ test_files:
|
|
162
163
|
- test/dummy/db/schema.rb
|
163
164
|
- test/dummy/db/test.sqlite3
|
164
165
|
- test/dummy/log/development.log
|
165
|
-
- test/dummy/log/test.log
|
166
166
|
- test/dummy/Rakefile
|
167
167
|
- test/dummy/README.rdoc
|
168
168
|
- test/factories/posts.rb
|