Skip to content

Commit 5398af6

Browse files
committed
Remove test duplication in ReactTest
1 parent 390c0db commit 5398af6

File tree

1 file changed

+1
-19
lines changed

1 file changed

+1
-19
lines changed

test/react_test.rb

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
require 'fileutils'
33

44
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
76
app_react_file_path = File.expand_path("../dummy/vendor/assets/javascripts/react.js", __FILE__)
87

98
react_file_token = "'test_confirmation_token_react_content_non_production';\n";
@@ -17,21 +16,4 @@ class ReactTest < ActionDispatch::IntegrationTest
1716
assert_response :success
1817
assert_equal react_file_token, @response.body
1918
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-
3719
end

0 commit comments

Comments
 (0)