Files
redmine_contracts/test/integration/deliverables_delete_test.rb
Eric Davis a2b810a4d8 [#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.
2010-08-12 09:26:09 -07:00

23 lines
714 B
Ruby

require 'test_helper'
class DeliverablesDeleteTest < ActionController::IntegrationTest
include Redmine::I18n
def setup
@project = Project.generate!(:identifier => 'main')
@contract = Contract.generate!(:project => @project, :name => 'A Contract')
@manager = User.generate!
@deliverable = FixedDeliverable.generate!(:contract => @contract, :manager => @manager)
end
should "allow anyone to delete the deliverable" do
visit_contract_page(@contract)
click_link_within "#deliverable_details_#{@deliverable.id}", 'Delete'
assert_response :success
assert_template 'contracts/show'
assert_nil Deliverable.find_by_id(@deliverable.id), "Deliverable not deleted"
end
end