render_turbo_stream 0.1.23 → 0.1.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -4
- data/lib/render_turbo_stream/test_helpers.rb +1 -1
- data/lib/render_turbo_stream/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fefb7da73ce6a177f1def683f0d713544011e11258cfc46c11785847ebda5e2e
|
4
|
+
data.tar.gz: 18f2719d7ffa9b0e697f8b65d45e40454c16907811ec2ddcd423eace2d3c5b1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4d2fd93deeeb26a77314a4b4d7ae1c8d7e187f70b4213ce941edc418366b3a347cf950f47afa4872773f33b8cc4769cf8571c14fd20a4b36689b0a83214a98b
|
7
|
+
data.tar.gz: d8565ef3855a81d5dd379c9ca3a161caa227523856855189779566d079f22fe35570a971aaa0fdc4a368c7de262105ac3eb94b783044832498ddf20b75f24049
|
data/README.md
CHANGED
@@ -92,10 +92,13 @@ include RenderTurboStream::TestHelpers
|
|
92
92
|
RSpec.describe "Articles", type: :request do
|
93
93
|
|
94
94
|
let(:invalid_params) { { article: { title: '', desciption: 'abc' } } }
|
95
|
-
|
95
|
+
|
96
96
|
it 'create failed' do
|
97
97
|
post articles_path(params: invalid_params)
|
98
98
|
|
99
|
+
# singular (partial_*) returns false if this element is cero or multiple times rendered to, otherwise the content
|
100
|
+
expect(partial_html_by_id('flash-box')).to include('Article could not be created')
|
101
|
+
|
99
102
|
expect(response.status).to eq(422)
|
100
103
|
expect(partials_count).to eq(2)
|
101
104
|
|
@@ -111,9 +114,6 @@ RSpec.describe "Articles", type: :request do
|
|
111
114
|
expect(partials_html_by_id['flash-box'].length).to eq(1)
|
112
115
|
expect(partials_html_by_id['flash-box'].first).to include('Article could not be created')
|
113
116
|
|
114
|
-
# unique_partial returns false if this ID is cero or multiple times rendered to
|
115
|
-
expect(partial_html_by_id_unique('flash-box')).to include('Article could not be created')
|
116
|
-
|
117
117
|
# *_path is the controller_path for calling the partial
|
118
118
|
expect(partials_params_by_path['layouts/flash'].length).to eq(1)
|
119
119
|
expect(partials_params_by_path['layouts/flash'].first['partial']).to eq('layouts/flash')
|