[#4180] Add Hourly Deliverables.

This commit is contained in:
Eric Davis committed 2010-07-01 16:02:33 -07:00
1 parent 5b098a43e5
commit 498b7b633d
6 files changed
+100 -15

No files matched your search

+31
View File
@@ -72,4 +72,35 @@ class DeliverablesNewTest < ActionController::IntegrationTest
assert_equal @manager, @deliverable.manager
assert_equal 1000.0, @deliverable.total.to_f
end
should "create a new Hourly deliverable" do
@manager = User.generate!
@role = Role.generate!
User.add_to_project(@manager, @project, @role)
visit_contract_page(@contract)
click_link 'Add New'
assert_response :success
fill_in "Title", :with => 'A New Deliverable'
select "Hourly", :from => "Type"
select @manager.name, :from => "Manager"
fill_in "Start", :with => '2010-01-01'
fill_in "End Date", :with => '2010-12-31'
fill_in "Notes", :with => 'Some notes on the deliverable'
click_button "Save"
assert_response :success
assert_template 'contracts/show'
@deliverable = Deliverable.last
assert_equal "A New Deliverable", @deliverable.title
assert_equal @contract, @deliverable.contract
assert_equal "HourlyDeliverable", @deliverable.type
assert_equal '2010-01-01', @deliverable.start_date.to_s
assert_equal '2010-12-31', @deliverable.end_date.to_s
assert_equal @manager, @deliverable.manager
end
end