Feature #20221 » RM_20221_Time_entry_query_column_week_Tests.diff
/mnt/devs/professionnel/web/rails/redmine_upstream/test/unit/time_entry_query_test.rb 2015-08-14 00:23:07.253125029 +0200 | ||
---|---|---|
27 | 27 |
:groups_users, |
28 | 28 |
:enabled_modules |
29 | 29 | |
30 |
include Redmine::I18n |
|
31 | ||
30 | 32 |
def test_activity_filter_should_consider_system_and_project_activities |
31 | 33 |
TimeEntry.delete_all |
32 | 34 |
system = TimeEntryActivity.create!(:name => 'Foo') |
... | ... | |
44 | 46 |
query.add_filter('activity_id', '!', [system.id.to_s]) |
45 | 47 |
assert_equal 4.0, query.results_scope.sum(:hours) |
46 | 48 |
end |
49 | ||
50 |
def test_availablec_columns_include_tweek |
|
51 |
set_language_if_valid 'en' |
|
52 | ||
53 |
q = TimeEntryQuery.new(:name => '_') |
|
54 |
c_week = q.available_columns.detect{|c| c.name == :tweek} |
|
55 | ||
56 |
assert_equal c_week.present?, true |
|
57 | ||
58 |
assert_equal c_week.caption, l(:label_week) |
|
59 | ||
60 |
assert_equal c_week.sortable, "#{TimeEntry.table_name}.tweek" |
|
61 |
end |
|
47 | 62 |
end |
- « Previous
- 1
- 2
- Next »