First create and boot one scenario. Then attempt to create a second scenario. Expect the following stack trace (when running the development server):
The expected behavior is either that more than one scenario is able to be run at the same time, or that at least an appropriate error message is displayed.
First create and boot one scenario. Then attempt to create a second scenario. Expect the following stack trace (when running the development server):
The expected behavior is either that more than one scenario is able to be run at the same time, or that at least an appropriate error message is displayed.
The issue seems to be that on this line
nil
is assigned to@scenario
. https://github.com/edurange/edurange-server/blob/1f693bb2fdd5ab6ca29d494b87cf26c9ae73e349/app/controllers/scenarios_controller.rb#L120-L123 So on this line there is a nil reference exception: https://github.com/edurange/edurange-server/blob/1f693bb2fdd5ab6ca29d494b87cf26c9ae73e349/app/controllers/scenarios_controller.rb#L126 TheScenarioLoader::fire!
procedure should either return a scenario or throw an exception. Alternatively, ifScenarioLoader::fire!
is allowed to return nil values, we need to handle that case inScenariosController::create