OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/spec/plugin_spec_helper.rb

12 lines
363 B

module Cost
module PluginSpecHelper
def is_member(project, user, permissions = [])
role = ::FactoryGirl.create(:role, :permissions => permissions)
::FactoryGirl.create(:member, :project => project,
:principal => user,
:roles => [role])
user.reload
end
end
end