Sha256: 752e533cfb83a3be062998fdea8c7e22b37a90df6cb35f9447d14a9cdaf9a01b
Contents?: true
Size: 1.2 KB
Versions: 16
Compression:
Stored size: 1.2 KB
Contents
require File.dirname(__FILE__) + '/../test_helper' require 'user_system' class WorkTest < Test::Unit::TestCase include UserSystem fixtures :parties, :users, :groups, :groups_users, :work_accounts, :backlogs, :periods, :tasks, :estimates, :works, :task_files def test_work_totals_for_week work_totals = Work.work_totals_for_week(24, 1000001) assert_equal 1, work_totals.size assert_equal Array, work_totals[1].class assert_equal 2, work_totals[1].size assert_equal Array, work_totals[1][0].class assert_equal Array, work_totals[1][1].class assert_equal 0, work_totals[1][1][0] assert_equal 40, work_totals[1][1][1] assert_equal 0, work_totals[1][1][2] assert_equal 0, work_totals[1][1][3] assert_equal 0, work_totals[1][1][4] assert_equal 0, work_totals[1][1][5] assert_equal 0, work_totals[1][1][6] end def test_find_work_for_day Thread.current[:user] = users(:tesla) assert_equal 1, Work.find_work_for_day(Date.parse('2007-06-12')).size end private # TODO (uwe): This method should be removed # It is here only because ClassTableInheritanceInRails broke reading fixtures by name def users(login) super(login) end end
Version data entries
16 entries across 16 versions & 1 rubygems