@controller = Arvados::V1::GroupsController.new
authorize_with :active
post :create, params: {
- group: {},
+ group: {group_class: "project"},
ensure_unique_name: boolparam
}
assert_response :success
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
}
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