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
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
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
Oliver Günther
04e5465286
Fix untransliterable characters breaking the value binding
...
https://community.openproject.org/work_packages/50972
2023-11-14 15:28:47 +01: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
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
Dombi Attila
98f8c5720c
Rewrite flickering search controller specs to feature specs
2023-05-03 10:59:18 +03:00
Dombi Attila
35f4004a38
Disable flickering spec in search_controller_spec.rb
2023-05-02 16:07:12 +03: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
Christophe Bliard
48a4f1b6ad
lint with rubocop --autocorrect (safe cops only)
2022-06-02 10:40:10 +02: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
Oliver Günther
ccfa29c728
Move license and copyright docs to root, fix names and references
2021-09-02 21:50:46 +02:00
ulferts
1bdd2ab9ae
safe automatic fixes by rubocop ( #8994 )
2021-02-11 16:02:18 +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
cf4975cad3
[26684] Redirect to WP from search only with #ID match on enter
...
Currently, the backend redirects to work packages whenever an ID is
exactly matched with or without the `#` prefix. This means users cannot
explicitly trigger a search through the "global" or "in this project"
buttons.
If we remember the match in the frontend, we can redirect it _only_ when
pressing enter. I also restricted the search to match with the `#`
prefix only
https://community.openproject.com/wp/26684
2020-03-30 07:59:32 +02:00
Henriette Dinger
bd7f4e4814
Update copyright notice
2020-01-15 11:31:26 +01:00
Jens Ulferts
fdaa449236
avoid initial search on work package tab
2019-03-13 15:04:12 +01:00
Wieland Lindenthal
9be3d50029
Remove more "titles only" logic and adopts specs
2019-01-30 15:56:57 +01:00
Oliver Günther
183ad1480e
Replace deprecated controller success? with succesful?
2018-12-03 10:31:58 +01:00
Oliver Günther
059770f533
FactoryGirl => FactoryBot
...
Removes the deprecation
2018-05-07 22:38:20 +02:00
Oliver Günther
6ef4211e77
Bump copyright to 2018 ( #6171 )
...
[ci skip]
2018-02-12 08:51:12 +01:00
Oliver Günther
7cf11bb689
Update copyright notice
2017-01-10 15:11:43 +01:00
Jens Ulferts
74d80eaab4
fix search controller spec
...
The spec failed, because the parameters of a preceding call where memoized
2016-09-13 14:40:10 +02:00
Alex Coles
ce93701029
Fix syntax (w/Rubocop) in specs
...
Signed-off-by: Alex Coles <alex@alexbcoles.com >
2015-06-30 12:08:28 +02:00
Alex Coles
ebbc9e3d7d
Prefer #not_to over #to_not in specs
...
Signed-off-by: Alex Coles <alex@alexbcoles.com >
2015-03-11 16:25:19 -03:00
Alex Coles
3785fdc9ed
Use #describe, #context with String arg not symbol
...
The semantics of `describe` have changed in RSpec 3: passing a symbol
rather than a string will change the value of the described object.
See discussion here: https://github.com/rspec/rspec-core/issues/1114
Signed-off-by: Alex Coles <alex@alexbcoles.com >
2015-03-11 01:13:11 -03:00
Alex Coles
944b89d83e
Convert specs to RSpec 3.2.0 syntax with Transpec
...
This conversion is done by Transpec 3.0.7 with the following command:
transpec -f
* 34 conversions
from: it { should ... }
to: it { is_expected.to ... }
* 14 conversions
from: obj.stub_chain(:message1, :message2)
to: allow(obj).to receive_message_chain(:message1, :message2)
* 7 conversions
from: obj.stub(:message)
to: allow(obj).to receive(:message)
* 4 conversions
from: be_true
to: be_truthy
* 3 conversions
from: obj.should_receive(:message)
to: expect(obj).to receive(:message)
* 2 conversions
from: failure_message_for_should { }
to: failure_message { }
* 2 conversions
from: failure_message_for_should_not { }
to: failure_message_when_negated { }
* 1 conversion
from: Klass.any_instance.stub(:message => value)
to: allow_any_instance_of(Klass).to receive_messages(:message => value)
* 1 conversion
from: be_false
to: be_falsey
* 1 conversion
from: obj.should_not_receive(:message)
to: expect(obj).not_to receive(:message)
* 1 conversion
from: stub('something')
to: double('something')
* 1 addition
of: RSpec.configure { |c| c.infer_spec_type_from_file_location! }
For more details: https://github.com/yujinakayama/transpec#supported-conversions
2015-03-10 19:59:02 -03:00
Alex Coles
e0191e759c
Update year in copyright header to 2015
...
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles
5afc11f19e
Fix syntax (w/Rubocop) in specs
...
Signed-off-by: Alex Coles <alex@alexbcoles.com >
2014-11-04 00:50:36 +01:00
Alex Coles
03978767be
Use 1.9+ Hash syntax in specs
...
Signed-off-by: Alex Coles <alex@alexbcoles.com >
2014-11-03 23:49:02 +01:00
Alex Coles
e137ed8135
Convert specs to RSpec 2.99.0 syntax with Transpec
...
This conversion is done by Transpec 2.3.1 with the following command:
transpec
* 72 conversions
from: describe 'some controller' { }
to: describe 'some controller', :type => :controller { }
* 57 conversions
from: describe 'some model' { }
to: describe 'some model', :type => :model { }
* 49 conversions
from: describe 'some view' { }
to: describe 'some view', :type => :view { }
* 34 conversions
from: obj.should
to: expect(obj).to
* 27 conversions
from: describe 'some routing' { }
to: describe 'some routing', :type => :routing { }
* 8 conversions
from: describe 'some feature' { }
to: describe 'some feature', :type => :feature { }
* 7 conversions
from: describe 'some helper' { }
to: describe 'some helper', :type => :helper { }
* 5 conversions
from: be_true
to: be_truthy
* 5 conversions
from: describe 'some request' { }
to: describe 'some request', :type => :request { }
* 2 conversions
from: obj.should_receive(:message)
to: expect(obj).to receive(:message)
* 2 conversions
from: obj.stub(:message)
to: allow(obj).to receive(:message)
* 1 conversion
from: before { example }
to: before { |example| example }
* 1 conversion
from: describe 'some mailer' { }
to: describe 'some mailer', :type => :mailer { }
For more details: https://github.com/yujinakayama/transpec#supported-conversions
2014-06-26 15:04:58 +02:00
Alex Coles
5cdc438c52
Convert specs to RSpec 2.99.0.beta2 syntax with Transpec
...
This conversion is done by Transpec 1.10.4 with the following command:
transpec
* 402 conversions
from: it { should ... }
to: it { is_expected.to ... }
* 67 conversions
from: be_true
to: be_truthy
* 55 conversions
from: be_false
to: be_falsey
* 35 conversions
from: it { should_not ... }
to: it { is_expected.not_to ... }
* 20 conversions
from: == expected
to: eq(expected)
* 5 conversions
from: obj.stub(:message)
to: allow(obj).to receive(:message)
* 4 conversions
from: =~ /pattern/
to: match(/pattern/)
* 1 conversion
from: obj.should_receive(:message)
to: expect(obj).to receive(:message)
* 1 conversion
from: Klass.any_instance.stub(:message)
to: allow_any_instance_of(Klass).to receive(:message)
* 1 conversion
from: after { example }
to: after { |example| example }
* 1 conversion
from: pending
to: skip
2014-04-17 23:35:32 +02:00
Alex Coles
73b809574a
Merge branch 'dev' into fix/rspec-expect-syntax
...
Signed-off-by: Alex Coles <alex@alexbcoles.com >
Conflicts:
spec/models/permitted_params_spec.rb
spec/models/work_package/work_package_acts_as_journalized_spec.rb
spec/models/work_package/work_package_planning_spec.rb
2014-04-07 17:40:20 +02:00
Alex Coles
0bdbdcac35
Convert specs to RSpec 2.14.8 syntax with Transpec
...
This conversion is done by Transpec 1.10.4 with the following command:
transpec
* 1414 conversions
from: obj.should
to: expect(obj).to
* 646 conversions
from: == expected
to: eq(expected)
* 376 conversions
from: obj.stub(:message)
to: allow(obj).to receive(:message)
* 107 conversions
from: obj.should_not
to: expect(obj).not_to
* 70 conversions
from: obj.should_receive(:message)
to: expect(obj).to receive(:message)
* 45 conversions
from: =~ [1, 2]
to: match_array([1, 2])
* 27 conversions
from: lambda { }.should
to: expect { }.to
* 13 conversions
from: Klass.any_instance.stub(:message)
to: allow_any_instance_of(Klass).to receive(:message)
* 8 conversions
from: === expected
to: be === expected
* 7 conversions
from: expect { }.not_to raise_error(SpecificErrorClass)
to: expect { }.not_to raise_error
* 6 conversions
from: =~ /pattern/
to: match(/pattern/)
* 2 conversions
from: obj.should_not_receive(:message)
to: expect(obj).not_to receive(:message)
* 1 conversion
from: < expected
to: be < expected
* 1 conversion
from: obj.stub!(:message)
to: allow(obj).to receive(:message)
* 1 conversion
from: stub('something')
to: double('something')
2014-03-31 10:50:22 +02:00
Alexey Fedorov
f4775c6a40
[ fix #4928 ] Made journal notes shown in search.
...
- Added tests and specs for bug #4928
- Examined bug
- Added debug output to examine event contents
- Examined journals
- Added highlight_first helper
- Used last_journal instead of #journals.last
- Fixed Journalized#last_journal to work when eager loading messed up search
- Fixed how journals are sorted when they are loaded (by version instead
of created_at)
- Added notes anchor when required
- Added notes anchor when required
- Note anchor uses version of journal note itself, not version of work package
- Fixed failed test in
functional/wiki_controlller_test.rb:WikiControllerTest
#test_update_stale_page_should_not_raise_an_error
- Fixed spec failures.
- Converted search helper test -> spec, removed test file.
- Moved helper methods from string to controller
- Fixed search controller spec.
- Temporary added isolated suite run to travis for
work_package_activity_provider_spec
- Removed temporary job for travis.
2014-03-29 15:25:29 +02:00
Johannes Wollert
8b096975fe
updates copyright headers
...
updates more copyright
more copyright headers
2014-02-27 16:39:51 +01:00
Johannes Wollert
16a54ea416
pretend to be a nested ressource when searching for stuff
2013-12-18 18:03:46 +01:00
Hagen Schink
69d116cca8
Moves some search tests to spec
2013-12-11 14:41:01 +01:00