summaryrefslogtreecommitdiffstats
path: root/test/unit/time_entry_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Merged r22746 from trunk to 5.1-stable (#40043).Marius Balteanu2024-02-271-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/branches/5.1-stable@22755 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop offense Rails/RedundantActiveRecordAllMethod (#37248).Go MAEDA2023-10-121-3/+3
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@22340 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Avoid exception during validation if the spent_on date of a time entry was ↵Go MAEDA2023-09-201-0/+10
| | | | | | | | | removed (#39079). Patch by Holger Just. git-svn-id: https://svn.redmine.org/redmine/trunk@22311 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix RuboCop offense Style/InverseMethods: Use `invalid?` instead of ↵Go MAEDA2023-03-251-2/+2
| | | | | | inverting `valid?` (#37248). git-svn-id: https://svn.redmine.org/redmine/trunk@22153 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use `require_relative` instead of `require File.expand_path(..., __FILE__)` ↵Go MAEDA2023-01-011-1/+1
| | | | | | | | | (#38093). Patch by Go MAEDA. git-svn-id: https://svn.redmine.org/redmine/trunk@22016 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year to 2023 (#38141).Go MAEDA2023-01-011-1/+1
| | | | git-svn-id: https://svn.redmine.org/redmine/trunk@22013 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Make the only enabled activity in a project the default one for time entry ↵Go MAEDA2022-07-171-0/+15
| | | | | | | | | (#10314). Patch by Mizuki ISHIKAWA. git-svn-id: https://svn.redmine.org/redmine/trunk@21709 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fix time entry activity is not set as default when the default activity ↵Marius Balteanu2022-06-201-0/+13
| | | | | | | | | exists as project specific activity (#33914). Patch by Mizuki ISHIKAWA. git-svn-id: https://svn.redmine.org/redmine/trunk@21668 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2022 (#36379).Go MAEDA2022-01-021-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@21342 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2021 (#33069).Go MAEDA2021-03-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@20846 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Delete spent time custom field values not visible by the user after ↵Go MAEDA2021-03-151-1/+2
| | | | | | | | | assignment (#33550). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@20802 e93f8b46-1217-0410-a6f0-8f06a7374b81
* fix source indent of test/unit/time_entry_test.rbToshi MARUYAMA2020-10-271-19/+19
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@20211 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year in source files to 2020 (#33069).Go MAEDA2020-03-031-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@19553 e93f8b46-1217-0410-a6f0-8f06a7374b81
* code layout clean up test/unit/time_entry_test.rbToshi MARUYAMA2019-10-191-2/+6
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@18770 e93f8b46-1217-0410-a6f0-8f06a7374b81
* code cleanup: rubocop: fix Layout/SpaceBeforeComma in lib/redmine/utils.rbToshi MARUYAMA2019-10-191-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@18769 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright year.Go MAEDA2019-05-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@18198 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Enable frozen_string_literal for some files under test directory (#26561).Go MAEDA2019-03-161-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@17978 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Add "frozen_string_literal: false" for all files (#26561).Go MAEDA2019-03-151-0/+2
| | | | | | | This will be changed to true in the future. git-svn-id: http://svn.redmine.org/redmine/trunk@17947 e93f8b46-1217-0410-a6f0-8f06a7374b81
* TimeEntryTest#test_create_should_validate_user_id occasionally fails (#30806).Go MAEDA2019-02-141-0/+1
| | | | | | | Patch by Go MAEDA. git-svn-id: http://svn.redmine.org/redmine/trunk@17867 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Test failure.Jean-Philippe Lang2018-12-161-0/+4
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@17758 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a permission to log time for another user (#3848).Jean-Philippe Lang2018-12-161-1/+19
| | | | | | Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17755 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Setting to restrict spent times on future dates (#3322).Go MAEDA2018-12-111-0/+17
| | | | | | | Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@17719 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds settings for time entry hours validation (#24005).Jean-Philippe Lang2017-07-191-0/+28
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16832 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Update copyright.Jean-Philippe Lang2017-06-251-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16685 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Test failure.Jean-Philippe Lang2017-01-141-0/+3
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@16195 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds settings to make the issue and/or comment fields mandatory for time ↵Jean-Philippe Lang2017-01-121-0/+9
| | | | | | | | logs (#24577). Patch by Marius BALTEANU. git-svn-id: http://svn.redmine.org/redmine/trunk@16176 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Only make sure it's a date.Jean-Philippe Lang2016-07-021-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15600 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Updates copyright for 2016.Jean-Philippe Lang2016-03-131-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@15238 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Validates that activity belongs to project activities (#19656).Jean-Philippe Lang2015-05-301-0/+8
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14288 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a role setting that viewing all or own time entries (#8929).Jean-Philippe Lang2015-05-301-0/+32
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@14275 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copyright update.Jean-Philippe Lang2015-01-111-1/+1
| | | | git-svn-id: http://svn.redmine.org/redmine/trunk@13872 e93f8b46-1217-0410-a6f0-8f06a7374b81
* update copyright year (#15977)Toshi MARUYAMA2014-01-291-1/+1
| | | | | | Contributed by Daniel Felix. git-svn-id: http://svn.redmine.org/redmine/trunk@12736 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Time entry with 2 digits year should not validate (#3107).Jean-Philippe Lang2013-02-241-0/+7
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11472 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Removed unused fixtures.Jean-Philippe Lang2013-02-031-2/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11321 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copyright for 2013 (#12788).Jean-Philippe Lang2013-01-121-1/+1
| | | | | | Patch by Daniel Felix. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11169 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Copyright update.Jean-Philippe Lang2012-05-051-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9636 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Makes time syntax case insensitive (#10635).Jean-Philippe Lang2012-04-111-0/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9387 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Don't use auth_sources fixtures when not needed.Jean-Philippe Lang2012-02-191-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8915 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Removed unnecessary calculations in time entries index.Jean-Philippe Lang2011-12-041-48/+0
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8085 e93f8b46-1217-0410-a6f0-8f06a7374b81
* add unit test to set project if project is nil at unit time entry testToshi MARUYAMA2011-09-221-0/+16
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7452 e93f8b46-1217-0410-a6f0-8f06a7374b81
* add unit test to validate time entryToshi MARUYAMA2011-09-221-0/+17
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7447 e93f8b46-1217-0410-a6f0-8f06a7374b81
* add missing fixtures at unit time entry test in running on empty databaseToshi MARUYAMA2011-09-221-1/+9
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7446 e93f8b46-1217-0410-a6f0-8f06a7374b81
* remove trailing white-spaces from test/unit/time_entry_test.rb.Toshi MARUYAMA2011-08-291-15/+15
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@6752 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Adds a test for TimeEntry#spent_on= with invalid string.Jean-Philippe Lang2011-01-141-0/+6
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4709 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Fixes TimeEntry#spent_on= so that datetimes don't get stored in SQLite3 (#7258).Jean-Philippe Lang2011-01-141-0/+30
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4708 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Use absolute paths in test/**/* requires for Ruby 1.9.2 compatibility. #4050Jean-Baptiste Barth2010-12-121-1/+1
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4509 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Change the TimelogController's to/from dates based on the project time entriesEric Davis2010-09-141-6/+39
| | | | | | | | Instead of looking for the earliest and latest time entry system wide for the dates in the form, now TimelogController will only look at the time entries for the current project (and parent/sub projects). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4087 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Refactor: move method to Model.Eric Davis2010-09-141-0/+15
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4086 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Force TimeEntry#hours default to nil (#3075, #4449).Jean-Philippe Lang2009-12-231-0/+4
| | | | git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@3232 e93f8b46-1217-0410-a6f0-8f06a7374b81
* Upgraded to Rails 2.3.4 (#3597)Eric Davis2009-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Ran the Rails upgrade * Upgraded to Rails Engines 2.3.2 * Added a plugin to let Engines override application views. * Converted tests to use the new classes: ** ActionController::TestCase for functional ** ActiveSupport::TestCase for units * Converted ActiveRecord::Error message to a string. * ActiveRecord grouping returns an ordered hash which doesn't have #sort! * Updated the I18n storage_units format. * Added some default initializers from a fresh rails app * Changed the order of check_box_tags and hidden_field_tags. The hidden tag needs to appear first in Rails 2.3, otherwise it will override any value in the check_box_tag. * Removed the custom handler for when the cookie store is tampered with. Rails 2.3 removed the TamperedWithCookie exception and instead Rails will not load the data from it when it's been tampered with (e.g. no user login). * Fixed mail layouts, 2.3 has problems with implicit multipart emails that use layouts. Also removed some custom Redmine mailer code. * Fixed a bug that occurred in tests where the "required" span tag would be added to the :field_status translation. This resulted in an email string of: <li>Status<span class="required"> *</span><span class="required"> *</span> Instead of: <li>Status: New</li> git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2887 e93f8b46-1217-0410-a6f0-8f06a7374b81