Disable requesting user logging.

pull/6827/head
Felix Schäfer 14 years ago
parent 71e21fd403
commit 8e7e2f09fe
  1. 2
      init.rb
  2. 1
      spec/controllers/principal_roles_controller_spec.rb
  3. 4
      spec/plugin_spec_helper.rb

@ -20,7 +20,7 @@ Redmine::Plugin.register :redmine_global_roles do
name 'Global Roles plugin' name 'Global Roles plugin'
author 'Jens Ulferts @ finnlabs' author 'Jens Ulferts @ finnlabs'
description 'Adds global, meaning non project bound, roles. Create Project becomes a global role.' description 'Adds global, meaning non project bound, roles. Create Project becomes a global role.'
version '0.1.3' version '0.1.4'
if RAILS_ENV != "test" if RAILS_ENV != "test"
require_or_load 'global_roles/permission_patch' require_or_load 'global_roles/permission_patch'

@ -17,6 +17,7 @@ describe PrincipalRolesController do
@principal_role.stub!(:id).and_return(23) @principal_role.stub!(:id).and_return(23)
PrincipalRole.stub!(:find).and_return @principal_role PrincipalRole.stub!(:find).and_return @principal_role
disable_flash_sweep disable_flash_sweep
disable_log_requesting_user
end end
describe :post do describe :post do

@ -84,6 +84,10 @@ module GlobalRoles
@controller.instance_eval{flash.stub!(:sweep)} @controller.instance_eval{flash.stub!(:sweep)}
end end
def disable_log_requesting_user
@controller.stub!(:log_requesting_user)
end
def response_should_render method, *params def response_should_render method, *params
unless @page unless @page
@page ||= mock("page") @page ||= mock("page")

Loading…
Cancel
Save