File tree 1 file changed +1
-19
lines changed
1 file changed +1
-19
lines changed Original file line number Diff line number Diff line change 2
2
require 'fileutils'
3
3
4
4
class ReactTest < ActionDispatch ::IntegrationTest
5
-
6
- test 'asset pipeline should deliver react file in a non-production variant' do
5
+ test 'asset pipeline should deliver drop-in react file replacement' do
7
6
app_react_file_path = File . expand_path ( "../dummy/vendor/assets/javascripts/react.js" , __FILE__ )
8
7
9
8
react_file_token = "'test_confirmation_token_react_content_non_production';\n " ;
@@ -17,21 +16,4 @@ class ReactTest < ActionDispatch::IntegrationTest
17
16
assert_response :success
18
17
assert_equal react_file_token , @response . body
19
18
end
20
-
21
- test 'asset pipeline should deliver drop-in react file replacement' do
22
- hidden_path = File . expand_path ( "../dummy/vendor/assets/react/test/react__.js" , __FILE__ )
23
- replacing_path = File . expand_path ( "../dummy/vendor/assets/react/test/react.js" , __FILE__ )
24
-
25
- FileUtils . mv hidden_path , replacing_path
26
- get '/assets/react.js'
27
-
28
- FileUtils . mv replacing_path , hidden_path
29
- FileUtils . rm_r CACHE_PATH if CACHE_PATH . exist?
30
-
31
- assert_response :success
32
- assert_equal "'test_confirmation_token_react_content';\n " , @response . body
33
-
34
- React ::Renderer . reset_combined_js!
35
- end
36
-
37
19
end
You can’t perform that action at this time.
0 commit comments