blob: f30b12dd7f41bc5d59a504617a13eede9f67fa00 (
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_member(user, GroupMember::DEVELOPER)
described_class.new.perform(group.id)
expect(user.reload.require_two_factor_authentication_from_group).to eq(false)
end
end
|