[#4177] Added a simple show view, to be skinned later.
This commit is contained in:
@@ -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
|
||||
Reference in New Issue
Block a user