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
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
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
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
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
72696429e8
Fix controller spec requiring admin
2020-09-03 10:31:03 +02:00
Henriette Dinger
bd7f4e4814
Update copyright notice
2020-01-15 11:31:26 +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
26dff6132e
Remove default route ( #6137 )
...
* Remove default route
* Fix and clean legacy specs
* Fix specs
* Fix missing ID in request parameters in view specs
https://stackoverflow.com/a/21789313
* Fix more invalid routes in specs
* Pass parameter to omniauth spec
* Add required ID parameter to types controller
* Fix invalid omniauth URL
* Fix project_id params in repository controller spec
* Fix missing project id in projects controller spec
* Fix missing params and failure url for omniauth
* Fix invalid route name
* Temporarily skip broken specs on dev
[ci skip]
2018-01-22 08:44:15 +01:00
Oliver Günther
93dcd386f4
Remove usage of CF translations
2017-04-03 22:34:08 +02:00
Oliver Günther
8d381651c8
Fix specs
2017-03-29 13:44:09 +02:00
Markus Kahl
f5a57e3f42
list custom field normalisation and multi select
2017-02-17 14:38:24 +00:00
Oliver Günther
7cf11bb689
Update copyright notice
2017-01-10 15:11:43 +01:00
Markus Kahl
86ab55b323
update type attribute visibility on cf changes
...
cf = custom field
2016-11-04 15:51:12 +01:00
Oliver Günther
92aebdcec4
Fix params deprecation
...
Fixes in spec/controllers:
```
DEPRECATION WARNING: ActionController::TestCase HTTP request methods will accept only
keyword arguments in future Rails versions.
```
2016-10-17 11:56:44 +02:00
Alex Coles
1a70a31c1c
Merge branch 'release/4.3' into feature/rails4
...
Signed-off-by: Alex Coles <alex@alexbcoles.com >
2015-07-16 09:32:40 +02:00
Jan Sandbrink
138d3dba29
fix some specs
...
- error messages now contain punctuation
- when :save returns false, there should be errors present
- errors in form representers are now API errors
2015-07-13 10:47:19 +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
d060e654a5
Use vanilla Rails validations for CustomField#name
...
Globalize should support regular Rails validations.
Additionally `validate_name` was no longer working as expected,
possibly due to changes in `CustomField::Translation` lifecycle.
* Do not test translation implementation details in
CustomFieldController spec.
Signed-off-by: Alex Coles <alex@alexbcoles.com >
2015-05-04 23:38:24 +02:00
Alex Coles
e5da2578d5
Merge branch 'dev' into feature/rails4
...
Signed-off-by: Alex Coles <alex@alexbcoles.com >
Conflicts:
.travis.yml
Gemfile
Gemfile.lock
README.md
app/assets/stylesheets/external.css.sass.erb
app/assets/stylesheets/legacy/main.css.sass
app/models/work_package.rb
config/routes.rb
lib/tabular_form_builder.rb
spec/controllers/versions_controller_spec.rb
spec/exemplars/type_exemplar.rb
spec/factories/type_factory.rb
spec/legacy/unit/default_data_spec.rb
spec/legacy/unit/helpers/application_helper_spec.rb
spec/legacy/unit/mail_handler_spec.rb
spec/legacy/unit/project_spec.rb
spec/legacy/unit/time_entry_activity_spec.rb
spec/legacy/unit/type_spec.rb
spec/models/work_package/work_package_validations_spec.rb
spec/requests/api/v3/render_resource_spec.rb
test/functional/types_controller_test.rb
test/test_helper.rb
test/unit/version_test.rb
2015-05-01 11:39:24 +02:00
Jan Sandbrink
5d63732d9f
fix broken specs for CF controller
...
- did expect the wrong things
- did send the wrong things
-> tests pass tough they shouldn't
2015-02-26 10:59:32 +01:00
Alex Coles
e0191e759c
Update year in copyright header to 2015
...
[ci skip]
2015-01-01 00:02:57 +00:00
Alex Coles
d173fb5a86
Reload translations in CustomFieldsController spec
...
Signed-off-by: Alex Coles <alex@alexbcoles.com >
2014-11-10 15:58:48 +01: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
Jens Ulferts
185547f4f2
avoids actually settings settings in specs by stubbing
...
Setting specs might influence other specs where that setting will also apply
2014-06-11 14:28:41 +02:00
Christian Ratz
fe6c359534
Merge branch 'release/3.0' into dev
...
Conflicts:
app/assets/javascripts/angular/helpers/svg-helper.js
app/assets/javascripts/timelines/ui.js
app/assets/stylesheets/global/_mixins.sass
app/assets/stylesheets/global/_variables.sass
app/controllers/members_controller.rb
app/views/layouts/base.html.erb
doc/CHANGELOG.md
spec/controllers/custom_fields_controller_spec.rb
2014-05-28 11:53:31 +02:00
slawa
2087f67a19
Test scenario form creating a custom field with empty name, other for check how the fallback name is set.
...
Conflicts:
spec/controllers/custom_fields_controller_spec.rb
2014-05-27 16:23:34 +02:00
slawa
371990e669
Test scenario form creating a custom field with empty name, other for check how the fallback name is set.
2014-05-26 13:04:54 +03: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
Johannes Wollert
8b096975fe
updates copyright headers
...
updates more copyright
more copyright headers
2014-02-27 16:39:51 +01:00
Philipp Tessenow
933a12ad43
fix custom_fields_controller_spec
2013-11-19 08:42:34 +01:00
Philipp Tessenow
a1e67dd460
new copyright header #1903
2013-09-16 17:59:31 +02:00
Philipp Tessenow
7724bacac6
we should use stub (not stub!) for stubbing
...
see: http://blog.firsthand.ca/2010/09/rspec-stub-vs-stub.html
2013-08-13 08:47:58 +02:00
Hagen Schink
a6f83f1d3c
Adapt references to work package
2013-06-25 08:30:05 +02:00
Hagen Schink
8baacde427
Fix tests
2013-06-21 15:02:50 +02:00
Jens Ulferts
21459a384f
provide every possible file with a short copyright notice
...
This was done using the rake task: rake copyright:update
2013-06-07 10:49:57 +02:00