diff options
author | Roger Rüttimann <ror@panter.ch> | 2019-02-06 15:08:39 +0100 |
---|---|---|
committer | Roger Meier <r.meier@siemens.com> | 2019-06-13 08:43:14 +0200 |
commit | 34a03d90c3a0a8ebda2143fcdca5d37a9b71db6e (patch) | |
tree | 03a26d417dd43edd2c062e15a43c41da288cc11c /spec | |
parent | 2a1c2c673f25aa1329e045bd907babbea037a9f1 (diff) | |
download | gitlab-ce-34a03d90c3a0a8ebda2143fcdca5d37a9b71db6e.tar.gz |
require update_two_factor_requirement on all sub-entities users
Diffstat (limited to 'spec')
-rw-r--r-- | spec/models/group_spec.rb | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 551d85bda6c..15ec672f165 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -654,7 +654,16 @@ describe Group do it 'calls #update_two_factor_requirement on each child project member' do project = create(:project, group: group) project_user = create(:user) - project.add_user(project_user, GroupMember::OWNER) + project.add_developer(project_user) + + expects_other_user_to_require_two_factors + end + + it 'calls #update_two_factor_requirement on each subgroups child project member' do + subgroup = create(:group, :nested, parent: group) + project = create(:project, group: subgroup) + project_user = create(:user) + project.add_developer(project_user) expects_other_user_to_require_two_factors end |