[#4410] Replace Payment Terms with an Enumeration

Instead of using a hard coded value for Payment Terms, they will use
Redmine's Enumeration table.  This provides an admin gui to managing
the value as well as ordering them.
This commit is contained in:
Eric Davis
2010-08-12 09:26:09 -07:00
parent c17e8eaf1b
commit a2b810a4d8
18 changed files with 110 additions and 31 deletions
+3 -1
View File
@@ -5,6 +5,8 @@ class ContractsNewTest < ActionController::IntegrationTest
def setup
@project = Project.generate!(:identifier => 'main')
PaymentTerm.generate!(:type => 'PaymentTerm', :name => 'Net 15')
PaymentTerm.generate!(:type => 'PaymentTerm', :name => 'Net 30')
end
should "allow any user to open the new contracts form" do
@@ -40,7 +42,7 @@ class ContractsNewTest < ActionController::IntegrationTest
assert_equal @account_executive, @contract.account_executive
assert_equal '2010-01-01', @contract.start_date.to_s
assert_equal '2010-12-31', @contract.end_date.to_s
assert_equal 'net_30', @contract.payment_terms
assert_equal 'Net 30', @contract.payment_term.name
end
end