[#4177] Added a simple show view, to be skinned later.

This commit is contained in:
Eric Davis
2010-06-21 14:09:07 -07:00
parent a77fa40207
commit 5bdbf4e75f
2 changed files with 37 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
require 'test_helper'
class ContractsShowTest < ActionController::IntegrationTest
include Redmine::I18n
def setup
@project = Project.generate!(:identifier => 'main')
@contract = Contract.generate!(:project => @project)
end
should "allow any user to view the contract" do
visit_contracts_for_project(@project)
click_link @contract.id
assert_response :success
assert_template 'contracts/show'
assert_equal "/projects/main/contracts/#{@contract.id}", current_url
assert_select "div#contract_#{@contract.id}.contract" do
assert_select 'h2', :text => @contract.name
end
end
end