Refactored the beforeEach slightly, moving the initial http get up into the base controller block, and removing the http expect from the other functions section
Added logic to check the parameters passed in to dialog.dialog