blob: a69dd893f8155a4846c4d68dd65f4dfc4e5ac196 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe DisallowTwoFactorForGroupWorker do
let_it_be(:group) { create(:group, require_two_factor_authentication: true) }
let_it_be(:user) { create(:user, require_two_factor_authentication_from_group: true) }
it "updates group" do
described_class.new.perform(group.id)
expect(group.reload.require_two_factor_authentication).to eq(false)
end
it "updates group members" do
group.add_user(user, GroupMember::DEVELOPER)
described_class.new.perform(group.id)
expect(user.reload.require_two_factor_authentication_from_group).to eq(false)
end
end
|