X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/b36138dd447b5ff557cfbb0e00c28899a9c3af17..3f5b1be0f705c8f1491fdca5e3b57982d97378fd:/services/api/test/functional/application_controller_test.rb diff --git a/services/api/test/functional/application_controller_test.rb b/services/api/test/functional/application_controller_test.rb index b74ff0f41d..2cfa054448 100644 --- a/services/api/test/functional/application_controller_test.rb +++ b/services/api/test/functional/application_controller_test.rb @@ -100,7 +100,7 @@ class ApplicationControllerTest < ActionController::TestCase @controller = Arvados::V1::GroupsController.new authorize_with :active post :create, params: { - group: {}, + group: {group_class: "project"}, ensure_unique_name: boolparam } assert_response :success @@ -113,7 +113,8 @@ class ApplicationControllerTest < ActionController::TestCase post :create, params: { group: { name: groups(:aproject).name, - owner_uuid: groups(:aproject).owner_uuid + owner_uuid: groups(:aproject).owner_uuid, + group_class: "project" }, ensure_unique_name: boolparam } @@ -121,4 +122,16 @@ class ApplicationControllerTest < ActionController::TestCase end end end + + test "exceptions with backtraces get logged at exception_backtrace key" do + Group.stubs(:new).raises(Exception, 'Whoops') + Rails.logger.expects(:info).with(any_parameters) do |param| + param.include?('Whoops') and param.include?('"exception_backtrace":') + end + @controller = Arvados::V1::GroupsController.new + authorize_with :active + post :create, params: { + group: {}, + } + end end