111 Commits

Author SHA1 Message Date
Oliver Günther 04dca13ab5 Add more specs 2025-07-07 13:17:55 +02:00
Oliver Günther 0e2142640a Extract cleanup_body spec into newly introduced handlers spec 2025-07-07 13:17:55 +02:00
Oliver Günther 76074f4626 Refactor MailHandler model class into services 2025-07-07 13:17:54 +02:00
Bruno Pagno c2886046cd update comment permission names 2025-04-24 13:12:32 +02:00
Jan Sandbrink 82fc4fcb13 Fix remaining unit test failures due to frozen string literals
This should fix the last known unit test failures occuring due to the usage of
frozen string literal comments. Those were tested in a separate
commit. Broadly enabling frozen string literals will happen in multiple
separate commits after this one and only after feature tests have been fixed
as well.
2025-04-04 17:09:48 +02:00
Oliver Günther fc7c5e3a42 Fix mail handler attrs 2025-02-19 20:57:37 +01:00
Aaron Contreras b3e497d6a8 Allow "Accountable" to be a settable field via inbound mails 2024-08-28 14:27:49 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
Christophe Bliard ba5b978145 Make done_ratio nil by default 2024-03-21 14:03:30 +01:00
Christophe Bliard 03d9ff74a8 Switch to double quotes for files modified on this branch 2024-03-21 12:04:50 +01:00
Aaron Contreras 310ed19af6 Lint: Don't tap to yield factory bot record 2024-03-05 10:39:24 -05:00
Richard "Virgo" Richter f30a43da7a Feature 50849, :edit_work_packages now allows change status as before.
:change_work_package_status permission is additive, but not disjunct
with :edit_work_packages - this means:
- no DB migration is needed, :edit_work_packages will work as before
- :change_work_package_status added to some tests was removed again
2024-01-08 12:12:14 +00:00
Richard "Virgo" Richter 9a530b6e0f Merge branch 'dev' into feature/50849_change_work_packages_status
# Conflicts:
#	spec/requests/api/v3/work_packages/update_resource_spec.rb
2024-01-08 08:39:36 +00:00
Christophe Bliard c795874f7f Update copyright year for 2024
command used: `rg -l 'Copyright \(C\) 2012-202\d the OpenProject' | xargs -n 100 sed -i -r 's/Copyright \(C\) 2012-202. the OpenProject/Copyright (C) 2012-2024 the OpenProject/'`
2024-01-02 16:23:54 +01:00
Christophe Bliard 1e870a0d2a Make spec/models/mail_handler_spec.rb faster
Using `shared_let` for caching project creation lead to almost twice faster spec run time (33 secs to 17 secs).
2023-12-21 11:48:39 +01:00
Richard "Virgo" Richter 682522d9a3 Feature 50849, removed now obsolete TODOs from mail_handler_spec.rb 2023-12-19 12:50:28 +00:00
Richard "Virgo" Richter 14731b63cd mail_handler_spec: add_work_package_attachments instead of edit WP
Some tests used edit_work_packages to allow adding attachments, which
can now be done with add_work_package_attachments.
2023-11-13 08:32:29 +00:00
Richard "Virgo" Richter 61c30d5df0 Feature 50849, test fixes, added permission change_work_package_status
Permission `change_work_package_status` was added to tests that already
used `edit_work_packages`.
There are broken tests using `add_work_packages`, mostly around boards
and backlogs, this will be fixed in the code later.
2023-11-08 12:39:51 +00:00
ulferts 8baeea286d adapt order in expected error message 2023-10-24 11:53:11 +02:00
ulferts 8c291c0000 fix specs 2023-10-12 16:07:40 +02:00
ulferts 5b2bc41f41 Merge remote-tracking branch 'origin/dev' into easier-factory-role-setup 2023-10-12 12:09:27 +02:00
ulferts 2b2abf864a introduce ProjectRole model 2023-10-09 14:34:20 +02:00
Klaus Zanders 78c1e4fadb Switch all uses of principal factories to use new interface 2023-10-09 10:39:44 +02:00
Dombi Attila 4f9906ed0d Fix specs 2023-06-16 15:14:14 +03:00
Christophe Bliard 4c2a9d0aa8 Enable RSpec zero monkey patching mode
The plan for RSpec 4.0 is to disable monkey patching.

See https://github.com/rspec/rspec-core/blob/main/features/configuration/zero_monkey_patching_mode.feature for details.
2023-05-31 19:22:29 +02:00
Christophe Bliard aa23106c11 lint: autocorrect RSpec/FactoryBot/ConsistentParenthesesStyle
command is

    rubocop -A --only RSpec/FactoryBot/ConsistentParenthesesStyle modules spec
2023-03-07 15:04:32 +01:00
Christophe Bliard 85b3258a29 Autocorrect with some rubocop cops
RSpec/Rails/InferredSpecType and Style/RedundantConstantBase

rubocop --autocorrect-all --only RSpec/Rails/InferredSpecType,Style/RedundantConstantBase spec modules/*/spec
2023-01-13 14:28:59 +01:00
Christophe Bliard 21a696ef9b Update copyright information for 2023 2022-12-30 15:51:26 +01:00
luz paz c757e6f60e Fix various typos
Found via `codespell -q 3 -S ./.git,./config/locales,./modules/xls_export/config/locales,./modules/job_status/config/locales,./modules/two_factor_authentication/config/locales,./modules/backlogs/config/locales/crowdin,./**/config/locales,./frontend/src/vendor -L ba,inflight,nd,parms,pullrequest,pullrequests,sur,varius`
2022-11-08 05:34:15 -05:00
Christophe Bliard 6998d77669 Use default values for notification_setting in user factory 2022-10-28 14:22:50 +02:00
Dombi Attila c47f889018 Merge pull request #11339 from opf/implementation/43675-migration-splitting-involved-notification-setting-and-date-defaults
[#43675] Migration splitting involved notification setting and date d…
2022-10-05 11:14:36 +02:00
ulferts 4cf59e7adf extract user creation in mailer 2022-09-28 17:25:10 +02:00
ulferts 03366d2a38 replace legacy spec 2022-09-28 17:25:09 +02:00
Dmitrii 0c85cc4287 [#43675] fix specs 2022-09-27 22:22:24 +02:00
ulferts c0bd8b531c replace legacy spec 2022-09-27 09:33:49 +02:00
ulferts de8ca66f98 replace legacy spec 2022-09-26 08:54:57 +02:00
Oliver Günther a6b7bee822 Cleanup code for duration / non working days (#11222)
* Remove work_packages_duration_field_active feature flag

  Duration is now globally active for 12.3.0.

* Remove `ignore_non_working_days: false` in tests

  Not needed anymore as it is now the default value. Keep it where the test explicitly refers to it, for clarity.

Co-authored-by: Christophe Bliard <c.bliard@openproject.com>
2022-09-01 15:18:19 +02:00
Christophe Bliard 382ec7e48c Merge branch 'dev' into implementation/41821-non-working-days-and-duration-in-scheduling 2022-08-17 12:42:31 +02:00
Oliver Günther ee4fdf78a8 In case of errors in mail_handler, serialize mail object properly
The mail being passed to UserMailer cannot be serialized by ActiveJob,
so this fails whenever background jobs are being used.

Instead of trying to pass a Mail::Message, only pass in the values we
need to send out the response.

https://community.openproject.org/wp/35823
2022-08-10 16:11:01 +02:00
Christophe Bliard 5ce9137c9d Fix test 2022-08-01 10:11:44 +02:00
Dombi Attila 8e8a6989be Hide duration form journal when the flag is disabled 2022-07-04 16:24:47 +03:00
ulferts 14fe32ea27 replace legacy spec 2022-06-17 14:37:46 +02:00
Christophe Bliard 48a4f1b6ad lint with rubocop --autocorrect (safe cops only) 2022-06-02 10:40:10 +02:00
Markus Kahl d5f00b5700 error reply for failed incoming email (#10726)
* error reply for failed incoming email

* deprecated date.to_s(:db) replaced with to_fs(:db)

* rubocop concessions

* nest away

* do not report errors to unknown users by default

* use verifying double
2022-06-01 15:48:26 +02:00
ulferts 2d3457388a add duration column to wp journals - hide in activity 2022-05-25 15:34:45 +02:00
ulferts d18f60aefe replace assignable column on role 2022-03-03 12:50:24 +01:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Christophe Bliard 47a297daae Fix argument alignment since f08bea3467 (#10129)
* Fix argument alignment since f08bea3467

The FactoryBot.* prefix has been removed in f08bea3467. Since then
rubocop complains about Layout/ArgumentAlignment. This commit fixes it.

* do not fix alignments for modules/*/spec yet

hoping to be under the limit of 65535 characters for reviewdog to report on rubocop errors
2022-02-02 21:48:06 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
ulferts 46c31f717d remove scanning subjects to identify reply email 2021-11-11 08:24:49 +01:00