Merged r9709 from trunk.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.0-stable@9721 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
84d5092508
commit
7f51bab0fc
|
@ -31,7 +31,7 @@ entries_by_day = entries.group_by(&:spent_on)
|
||||||
<% entries_by_day[day].each do |entry| -%>
|
<% entries_by_day[day].each do |entry| -%>
|
||||||
<tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;">
|
<tr class="time-entry" style="border-bottom: 1px solid #f5f5f5;">
|
||||||
<td class="activity"><%=h entry.activity %></td>
|
<td class="activity"><%=h entry.activity %></td>
|
||||||
<td class="subject"><%=h entry.project %> <%= ' - ' + link_to_issue(entry.issue, :truncate => 50) if entry.issue %></td>
|
<td class="subject"><%=h entry.project %> <%= h(' - ') + link_to_issue(entry.issue, :truncate => 50) if entry.issue %></td>
|
||||||
<td class="comments"><%=h entry.comments %></td>
|
<td class="comments"><%=h entry.comments %></td>
|
||||||
<td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
|
<td class="hours"><%= html_hours("%.2f" % entry.hours) %></td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
|
|
|
@ -22,7 +22,8 @@ require 'my_controller'
|
||||||
class MyController; def rescue_action(e) raise e end; end
|
class MyController; def rescue_action(e) raise e end; end
|
||||||
|
|
||||||
class MyControllerTest < ActionController::TestCase
|
class MyControllerTest < ActionController::TestCase
|
||||||
fixtures :users, :user_preferences, :roles, :projects, :issues, :issue_statuses, :trackers, :enumerations, :custom_fields, :auth_sources
|
fixtures :users, :user_preferences, :roles, :projects, :members, :member_roles,
|
||||||
|
:issues, :issue_statuses, :trackers, :enumerations, :custom_fields, :auth_sources
|
||||||
|
|
||||||
def setup
|
def setup
|
||||||
@controller = MyController.new
|
@controller = MyController.new
|
||||||
|
@ -43,6 +44,20 @@ class MyControllerTest < ActionController::TestCase
|
||||||
assert_template 'page'
|
assert_template 'page'
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def test_page_with_timelog_block
|
||||||
|
preferences = User.find(2).pref
|
||||||
|
preferences[:my_page_layout] = {'top' => ['timelog']}
|
||||||
|
preferences.save!
|
||||||
|
TimeEntry.create!(:user => User.find(2), :spent_on => Date.yesterday, :issue_id => 1, :hours => 2.5, :activity_id => 10)
|
||||||
|
|
||||||
|
get :page
|
||||||
|
assert_response :success
|
||||||
|
assert_select 'tr.time-entry' do
|
||||||
|
assert_select 'td.subject a[href=/issues/1]'
|
||||||
|
assert_select 'td.hours', :text => '2.50'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def test_my_account_should_show_editable_custom_fields
|
def test_my_account_should_show_editable_custom_fields
|
||||||
get :account
|
get :account
|
||||||
assert_response :success
|
assert_response :success
|
||||||
|
|
Loading…
Reference in New Issue