[#4177] Hooked up the project module and menu item for Contracts.
This commit is contained in:
1 parent
9a100d5f56
commit
f4a2b39ba2
3 files changed
+25
-1
No files matched your search
@@ -0,0 +1 @@
|
|||||||
|
Yay!
|
||||||
@@ -12,8 +12,14 @@ Redmine::Plugin.register :redmine_contracts do
|
|||||||
requires_redmine_plugin :redmine_rate, :version_or_higher => '0.1.0'
|
requires_redmine_plugin :redmine_rate, :version_or_higher => '0.1.0'
|
||||||
|
|
||||||
project_module :contracts do
|
project_module :contracts do
|
||||||
permission :manage_budget, {}, :require => :member
|
permission :manage_budget, {:contracts => [:index] }, :public => true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
menu(:project_menu,
|
||||||
|
:contracts,
|
||||||
|
{:controller => 'contracts', :action => 'index'},
|
||||||
|
:caption => :text_contracts,
|
||||||
|
:param => :project_id)
|
||||||
end
|
end
|
||||||
|
|
||||||
require 'dispatcher'
|
require 'dispatcher'
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
require 'test_helper'
|
||||||
|
|
||||||
|
class ContractsListTest < ActionController::IntegrationTest
|
||||||
|
def setup
|
||||||
|
@project = Project.generate!
|
||||||
|
@contract = Contract.generate!(:project => @project)
|
||||||
|
end
|
||||||
|
|
||||||
|
should "allow any user to list the contracts on a project" do
|
||||||
|
visit_project(@project)
|
||||||
|
click_link "Contracts"
|
||||||
|
|
||||||
|
assert_response :success
|
||||||
|
assert_template 'contracts/index'
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
Reference in new issue
Block a user