[#4177] Created a Contract list view based on the comps.

This commit is contained in:
Eric Davis
2010-06-17 15:39:12 -07:00
parent 5960a4359a
commit 1729bc48c9
4 changed files with 57 additions and 6 deletions
+20 -5
View File
@@ -1,17 +1,32 @@
require 'test_helper'
class ContractsListTest < ActionController::IntegrationTest
include Redmine::I18n
def setup
@project = Project.generate!
@contract = Contract.generate!(:project => @project)
@contract2 = 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'
visit_contracts_for_project(@project)
end
should "list all contracts for the project" do
visit_contracts_for_project(@project)
assert_select "table#contracts" do
[@contract, @contract2].each do |contract|
assert_select "td", :text => /#{contract.id}/
assert_select "td", :text => /#{contract.name}/
assert_select "td", :text => /#{contract.account_executive.name}/
assert_select "td", :text => /#{format_date(contract.end_date)}/
end
end
end
should "not list contracts from other projects"
end