34 Commits

Author SHA1 Message Date
Markus Kahl 67063499cb rubocop 2026-03-09 14:49:36 +00:00
Markus Kahl 4c7559c6d7 update spec 2026-03-09 14:25:24 +00:00
Markus Kahl 2a56b3beea rubocop 2026-03-07 13:51:58 +00:00
Markus Kahl 7afb5f92ef fix test_mail_notification_spec 2026-03-05 12:15:36 +00:00
Jan Sandbrink 0b87e7543f Freeze string literals in specs
Rolling out frozen string literals further by freezing all
string literals in core specs.
2025-05-05 09:29:55 +02:00
Oliver Günther f791d33b72 Replace specs 2025-01-14 10:20:35 +01:00
Oliver Günther cd2d0f0e1a Remove primerized_flash prefix in methods 2024-09-30 21:39:36 +02:00
Oliver Günther 9cc3d98391 Replace expect_primerized_error -> expect_primerized_flash 2024-09-30 21:39:00 +02:00
Oliver Günther 1cf49e2c9f Adapt specs 2024-09-30 20:37:00 +02:00
Ivan Kuchin 4911b8a149 remove years from copyrights (except for COPYRIGHT file) 2024-07-31 15:02:49 +02:00
ulferts 3b2121f733 Revert "Merge remote-tracking branch 'origin/release/13.4' into dev"
This reverts commit 40b2bbeb09, reversing
changes made to b4c6cb17cc.
2024-03-21 11:31:17 +01:00
Ivan Kuchin 7787e457a3 Revert "Merge branch 'dev' into release/13.4"
This reverts commit a901541269, reversing
changes made to e573ca00b7.
2024-03-20 20:19:08 +01:00
Ivan Kuchin 9e4934cd0a change quotes using rubocop --only Style/StringLiterals,Style/QuotedSymbols -a 2024-03-20 18:05:22 +01:00
Christophe Bliard 8fa8584538 Run rubocop --autocorrect on all files
Only the safe cops have run. rubocop version is 1.59.0.
2024-01-05 15:27:09 +01: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
bsatarnejad 11d7351ef1 replacing flash with toast in two tests which are flickering on dev 2023-07-19 07:05:24 +02:00
Aaron Contreras df4d95010f Switch admin/test_mail_notification_spec to cuprite 2023-06-28 05:18:54 -05: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 9e865b4f7b lint: Run rubocop safe autocorrect
Command is `rubocop --safe --autocorrect app lib lib_static modules spec`
2023-03-09 10:25:57 +01: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
Oliver Günther 4c6e5b4907 Use browser based feature test for CRUD tests
They have form authenticity now and will fail otherwise
2022-04-06 08:05:39 +02:00
Christophe Bliard bc8d423ec2 update copyright information for 2022 2022-03-01 17:05:59 +01:00
Oliver Günther f08bea3467 Remove FactoryBot.* prefix where applicable 2022-01-25 08:19:06 +01:00
Oliver Günther ccfa29c728 Move license and copyright docs to root, fix names and references 2021-09-02 21:50:46 +02:00
Oliver Günther 34f8e9dff8 Validate admin guard for all settings writers (#9012)
* Validate admin guard for all settings writers

* Add spec to test access to all links under admin

* Fix broken specs

* Keep only UpdateContract and add spec

* Move admin settings under their own namespace for clarity

Move all admin related settings under ::Admin::SettingsController

* Fix more paths and views for settings

Adds another spec to ensure all links in admin can be viewed by admin

* Fix wrongly changed settings path for repositories page

* Use plugin name for plugin settings
2021-02-22 20:46:27 +01:00
Oliver Günther 2cde433326 Remove usages of AnyFixture (#8987)
AnyFixture will create once instance of a factory for reuse in a number of specs.
This will work fine until we require a clean slate for a specific example.

As we have numerous tests that test like the database is empty,
we get a number of disadvantages:

  - After an example with `with_clean_fixture` metadata, the fixture will only be regenerated
    after the next example that uses it. This means the order of execution will change
    the number of objects in the DB.

  - The more `with_clean_fixture` we have, the smaller the performance advantage of AnyFixture will
    result in.

  - You cannot use an AnyFixture in a spec that needs a clean slate. This should be obvious but was overlooked
    by myself.
2021-02-10 08:59:15 +01:00
ulferts 6140f4c7e9 update copyright to 2021 (#8925)
Updates the copyright to 2021 for all files that have a copyright. Files in our source code without the copyright header still do not receive one automatically. Additionally, backlisted files are also excluded.

Previously the copyright of chiliproject which references redmine stated a copyright of redmine up to and including 2017 which is not true for the code we have in here. Because of that I changed that to 2013
2021-01-13 17:47:45 +01:00
Oliver Günther 53f2d694ff Use AnyFixtures to generate fixtures from factories (#7230)
Uses FactoryBot to keep and maintain specific records in a special transaction that does not get removed after each spec.
They automatically are created whenever first hitting them.
This makes an excellent time saver for items that are commonly used, such as an admin user account
2020-04-09 11:54:26 +02:00
ulferts c6a638c79f adapt specs 2020-02-07 14:37:32 +01:00
ulferts 3e4d21e052 extract email settings into own menu item 2020-02-07 14:37:31 +01:00
Henriette Dinger bd7f4e4814 Update copyright notice 2020-01-15 11:31:26 +01:00
Oliver Günther 3260bdcfb4 [28226] Fix mail notification double escape
https://community.openproject.com/wp/28226
2018-08-16 08:50:08 +02:00