diff --git a/nginx_stage/test/fixtures/restart_confirmation.html b/nginx_stage/test/fixtures/restart_confirmation.html new file mode 100644 index 0000000000..435f7102e9 --- /dev/null +++ b/nginx_stage/test/fixtures/restart_confirmation.html @@ -0,0 +1,46 @@ + + + + + +

+ App has not been initialized or does not exist +

+

+ This is the first time this app has been launched in your per-user + NGINX (PUN) server. This requires a configuration change followed + by a restart of your PUN server. Be sure you save all the work you + are doing in other apps that have active websocket connections + (i.e., Shell App) and you complete all file uploads/downloads. +

+

+ Clicking the "Initialize App" button will apply the configuration + change and restart your per-user NGINX (PUN) server. +

+ Initialize App + + diff --git a/nginx_stage/test/views/pun_config_view_test.rb b/nginx_stage/test/views/pun_config_view_test.rb new file mode 100644 index 0000000000..7e25b9d523 --- /dev/null +++ b/nginx_stage/test/views/pun_config_view_test.rb @@ -0,0 +1,15 @@ +require 'test_helper' + +class PunConfigViewTest < Minitest::Test + include NginxStage::PunConfigView + + # required for generating the restart_confirmation in the PunConfigView module + def app_init_url + '/test' + end + + def test_restart_confirmation_view + expected = File.read('test/fixtures/restart_confirmation.html') + assert_equal(expected, restart_confirmation) + end +end