Class: RubeeAppTest
- Inherits:
-
Minitest::Test
- Object
- Minitest::Test
- RubeeAppTest
- Includes:
- Rack::Test::Methods
- Defined in:
- lib/tests/controllers/rubeeapp_test.rb
Instance Method Summary collapse
Instance Method Details
#app ⇒ Object
6 7 8 |
# File 'lib/tests/controllers/rubeeapp_test.rb', line 6 def app Rubee::Application.instance end |
#test_not_found_route ⇒ Object
18 19 20 21 22 |
# File 'lib/tests/controllers/rubeeapp_test.rb', line 18 def test_not_found_route get('/random') assert_equal(404, last_response.status) end |
#test_react_home ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/tests/controllers/rubeeapp_test.rb', line 24 def test_react_home Rubee::Configuration.setup(env = :test) { _1.react = { on: true, env: } } get('/home') assert_equal(200, last_response.status) assert_includes(last_response.body, '<div id="App">') assert_includes(last_response.body, 'bundle.js') Rubee::Configuration.setup(env = :test) { _1.react = { on: false, env: } } end |
#test_welcome_route ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/tests/controllers/rubeeapp_test.rb', line 10 def test_welcome_route skip "This test fails intermittently" get('/') assert_equal(200, last_response.status, "Unexpected response: #{last_response.body}") assert_includes(last_response.body, 'All set up and running!') end |