Pierre de La Morinerie
4cb747fdb6
specs: always require rails_helper
...
Test helpers are separated between two files: spec_helper and
rails_helper. This separation is meant to allow tests that do not
require Rails (like testing standalone libs) to boot faster.
The spec_helper file is always loaded, through `--require spec_helper`
in the `.rspec` config file. When needed, the rails_helper file is
expected to be required manually.
This is fine, but:
- Many test files have a redundant `require 'spec_helper'` line;
- Many test files should require `rails_helper`, but don't.
Not requiring `rails_helper` will cause the Rails-concerned section of
the test environment not to be configured–which may cause subtle bugs
(like the test database not being properly initialized).
Moreover, Spring loads all the Rails files on preloading anyway. So the
gains from using only `spec_helper` are thin.
To streamline this process, this commit:
- Configures `.rspec` to require `rails_helper` by default;
- Remove all manual requires to spec_helper or rails_helper.
Reference: https://stackoverflow.com/questions/24145329/how-is-spec-rails-helper-rb-different-from-spec-spec-helper-rb-do-i-need-it
2020-03-31 12:48:32 +02:00
Pierre de La Morinerie
245ef2befd
specs: fix an Rspec warning
2020-03-30 11:12:25 +02:00
Paul Chavard
c707a21f97
Rename delete_and_keep_track -> discard_and_keep_track
2020-03-26 14:23:23 +01:00
Paul Chavard
5c2eba1dd1
Always add a reason to dossier deletion
2020-03-24 09:30:11 +01:00
Paul Chavard
1ce1c1e6d0
use discard
2020-02-13 12:31:59 +01:00
Christophe Robillard
4bf020cb96
rend le test plus élégant
2020-02-04 16:07:01 +01:00
Christophe Robillard
6fc8a27bd7
destroys not all dossiers
...
but only dossiers for a specific user
2020-02-04 16:07:01 +01:00
Christophe Robillard
cee4c5b8fb
Revert "Revert "4127 fix superadmin supprime compte usager""
...
This reverts commit 751f24f7bb
.
2020-02-04 16:07:01 +01:00
Pierre de La Morinerie
751f24f7bb
Revert "4127 fix superadmin supprime compte usager"
2020-01-21 18:57:54 +01:00
Christophe Robillard
d9570eedc6
empêche suppression d'un user qui est instructeur
2020-01-21 15:05:33 +01:00
Christophe Robillard
d4de5769ee
empêche la suppression d'un user qui est admin
2020-01-21 15:05:33 +01:00
Christophe Robillard
d8a51f986f
supprime un utilisateur qui a des dossiers cachés
2020-01-21 15:05:33 +01:00
Christophe Robillard
d289c21a8b
speak english for test descriptions
2020-01-13 10:06:43 +01:00
Christophe Robillard
0f881f942b
raise if trying to del a user who can't be deleted
2020-01-13 10:06:43 +01:00
Christophe Robillard
a0b4d97d08
fix rubocop offenses
2020-01-13 10:06:43 +01:00
Christophe Robillard
9a62d3fe0c
delete a user
2020-01-13 10:06:43 +01:00
Christophe Robillard
58ef36ff57
tells if a user can be deleted
2020-01-13 10:06:43 +01:00
simon lehericey
4b62c9267a
fix flaky test
2019-11-18 17:26:28 +01:00
simon lehericey
b193dd1465
User get the active notion
2019-11-05 14:10:39 +01:00
simon lehericey
aeb44dd2aa
Cleaning spec
2019-11-05 10:29:39 +01:00
simon lehericey
e3d7688e66
[ fix #4473 ] Invite_administrateur!: do not reset password if the user is active
2019-11-05 10:29:39 +01:00
simon lehericey
53c7997081
Invite_administrateur!: characterization test
2019-11-05 10:29:39 +01:00
Pierre de La Morinerie
f8358b3ae9
instructeurs: create without providing the email
2019-11-04 10:44:24 +01:00
simon lehericey
97d0855d47
add User.create_or_promote_to_instructeur
2019-08-20 12:20:12 +02:00
simon lehericey
c08e356367
Remove or fix nonsense code
2019-08-14 15:08:14 +02:00
simon lehericey
65a53909e1
Update instructeur factory
2019-08-13 15:15:16 +02:00
simon lehericey
47b7dc368b
Remove or fix now nonsense code
2019-08-13 15:15:16 +02:00
simon lehericey
3fde2a6f70
Rename gestionnaire in code to instructeur
2019-08-12 13:47:01 +02:00
maatinito
8d3e3baabc
#3928 administrator new & edit pwd pages
2019-08-01 17:12:14 +02:00
simon lehericey
0f9fdf3f75
Activate device email change confirmation
2019-07-09 11:55:17 +02:00
gregoirenovel
df7e0a9881
Remove dead code
2018-12-19 14:59:15 +01:00
gregoirenovel
c8f872c566
InviteUser → Invite
2018-10-10 12:07:10 +02:00
Pierre de La Morinerie
082ef92a99
invite: move invites link to the after_confirmation
callback
...
Refactored from 6a69d958da
The `after_confirmation_path_for` isn't really made to be a callbback.
For instance, it is not executed during tests.
Moving the invitations linking to a proper documented callback allows
the linking to work in a testing environment, when invoking `user.confirm`.
2018-09-19 12:08:28 +02:00
gregoirenovel
0329b1db68
Use User#owns_or_invite? instead of Dossier#owner_or_invite?
2018-05-31 14:39:43 +02:00
gregoirenovel
4e9565a5df
Adds User#owns?
2018-05-31 14:39:43 +02:00
gregoirenovel
e26f4148ff
Bump development gems
...
- brakeman
- rubocop
- scss_lint
2018-03-06 16:17:22 +01:00
gregoirenovel
fe7f8da636
Revert "Bump development gems"
...
This reverts commit d6ad3fc3fd
.
2018-03-06 15:11:26 +01:00
gregoirenovel
d6ad3fc3fd
Bump development gems
...
- brakeman
- rubocop
- scss_lint
2018-03-06 10:36:35 +01:00
gregoirenovel
9666ed7d5d
Remove useless tests
2017-07-19 13:32:59 +02:00
gregoirenovel
f1907f4d0e
Enable the Layout/EmptyLinesAroundBlockBody cop
2017-06-13 10:35:23 +02:00
Xavier J
e85cb4c24b
Delete features unified_login
2016-12-16 14:39:17 +01:00
Xavier J
7cb2e80a3d
Sync credentials between user, gestionnaire and administrateur account
2016-12-07 17:24:01 +01:00
Xavier J
a5a95abf06
Fix test for all Model
2016-11-14 18:36:09 +01:00
Julien Portalier
fa762dbb39
Add unified_login feature flip
2016-10-18 15:52:14 +02:00
Julien Portalier
687f87e457
Sync user/gestionnaire credentials (OpenSimplif)
...
Syncs email and password when either a gestionnaire or a user is
updated and it has an associated user or gestionnaire (same email).
2016-10-18 14:25:16 +02:00
Xavier J
6d5a3e6256
User and Guest can be upload new documents on our recapitulative dossier page.
2016-03-22 17:36:36 +01:00
Xavier J
eeaefdcc79
Add reference to user who upload a cerfa or a piece justificative
2016-03-17 17:33:38 +01:00
Xavier J
e2a896d0b0
Gestionnaire can invite an email contact to participate at a dossier
2016-02-08 18:16:18 +01:00
Xavier J
4d812220fd
- Add FranceConnectInformation table to make safe FranceConnect pivot identity.
...
- Adapt source code with the new table
2016-01-21 17:06:09 +01:00
Xavier J
9e0dfb593e
Add FranceConnect Particulier
...
Reactivate FranceConnect Entreprise
2015-12-24 10:12:23 +01:00