diff options
author | Roger Rüttimann <ror@panter.ch> | 2019-02-07 16:28:00 +0100 |
---|---|---|
committer | Roger Meier <r.meier@siemens.com> | 2019-06-13 08:43:14 +0200 |
commit | ff22dfbf7a4f539b676101b51e5ad892d56da920 (patch) | |
tree | 94ad3e30a5caab1da5cffed12819156a1ea4e929 | |
parent | 34289f6657e83ec34d5eb2c3b89323546fdd3690 (diff) | |
download | gitlab-ce-ff22dfbf7a4f539b676101b51e5ad892d56da920.tar.gz |
fix tests for mysql db.
-rw-r--r-- | spec/models/group_spec.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb index 7f0b1185ba4..e1c5479851c 100644 --- a/spec/models/group_spec.rb +++ b/spec/models/group_spec.rb @@ -625,7 +625,7 @@ describe Group do group.update!(description: 'foobar') end - def expects_other_user_to_require_two_factors + def expects_other_user_to_require_two_factors(expected_calls_mysql_db = 1) calls = 0 allow_any_instance_of(User).to receive(:update_two_factor_requirement) do calls += 1 @@ -636,7 +636,7 @@ describe Group do if Group.supports_nested_objects? expect(calls).to eq 2 else - expect(calls).to eq 1 + expect(calls).to eq expected_calls_mysql_db end end @@ -644,7 +644,7 @@ describe Group do other_user = create(:user) group.add_user(other_user, GroupMember::OWNER) - expects_other_user_to_require_two_factors + expects_other_user_to_require_two_factors(2) end it 'calls #update_two_factor_requirement on each subgroup member' do @@ -660,7 +660,7 @@ describe Group do project_user = create(:user) project.add_developer(project_user) - expects_other_user_to_require_two_factors + expects_other_user_to_require_two_factors(2) end it 'calls #update_two_factor_requirement on each subgroups child project member' do |