[#4177] Hooked up the project module and menu item for Contracts.

This commit is contained in:
Eric Davis
2010-06-17 15:17:11 -07:00
parent 9a100d5f56
commit f4a2b39ba2
3 changed files with 25 additions and 1 deletions

View File

@@ -0,0 +1 @@
Yay!

View File

@@ -12,8 +12,14 @@ Redmine::Plugin.register :redmine_contracts do
requires_redmine_plugin :redmine_rate, :version_or_higher => '0.1.0'
project_module :contracts do
permission :manage_budget, {}, :require => :member
permission :manage_budget, {:contracts => [:index] }, :public => true
end
menu(:project_menu,
:contracts,
{:controller => 'contracts', :action => 'index'},
:caption => :text_contracts,
:param => :project_id)
end
require 'dispatcher'

View File

@@ -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