test/integration_tests/apache2_tests.rb in passenger-4.0.36 vs test/integration_tests/apache2_tests.rb in passenger-4.0.37

- old
+ new

@@ -156,9 +156,66 @@ @server = "http://1.passenger.test:#{@apache2.port}" get('/').should == "This is the stub directory." end end + describe "a Node.js app running on the root URI" do + before :all do + create_apache2_controller + @server = "http://1.passenger.test:#{@apache2.port}" + @stub = NodejsStub.new('node') + @apache2 << "RailsMaxPoolSize 1" + @apache2.set_vhost("1.passenger.test", "#{@stub.full_app_root}/public") + @apache2.start + end + + after :all do + @stub.destroy + @apache2.stop if @apache2 + end + + before :each do + @stub.reset + end + + it_should_behave_like "an example web app" + end + + describe "a Node.js app running in a sub-URI" do + before :all do + create_apache2_controller + @server = "http://1.passenger.test:#{@apache2.port}/subapp" + @stub = NodejsStub.new('node') + @apache2 << "RailsMaxPoolSize 1" + @apache2.set_vhost("1.passenger.test", File.expand_path("stub")) do |vhost| + vhost << %Q{ + Alias /subapp #{@stub.full_app_root}/public + <Location /subapp> + PassengerBaseURI /subapp + PassengerAppRoot #{@stub.full_app_root} + </Location> + } + end + @apache2.start + end + + after :all do + @stub.destroy + @apache2.stop if @apache2 + end + + before :each do + @stub.reset + end + + it_should_behave_like "an example web app" + + it "does not interfere with the root website" do + @server = "http://1.passenger.test:#{@apache2.port}" + get('/').should == "This is the stub directory." + end + end + describe "compatibility with other modules" do before :all do create_apache2_controller @apache2 << "RailsMaxPoolSize 1"