diff options
Diffstat (limited to 'spec/policies/group_policy_spec.rb')
-rw-r--r-- | spec/policies/group_policy_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/policies/group_policy_spec.rb b/spec/policies/group_policy_spec.rb index 9bd692b45c3..3e0ea164e3d 100644 --- a/spec/policies/group_policy_spec.rb +++ b/spec/policies/group_policy_spec.rb @@ -137,7 +137,7 @@ RSpec.describe GroupPolicy do context 'with subgroup_creation level set to maintainer' do before_all do - group.update(subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS) + group.update!(subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS) end it 'allows every maintainer permission plus creating subgroups' do @@ -409,7 +409,7 @@ RSpec.describe GroupPolicy do context 'transfer_projects' do shared_examples_for 'allowed to transfer projects' do before do - group.update(project_creation_level: project_creation_level) + group.update!(project_creation_level: project_creation_level) end it { is_expected.to be_allowed(:transfer_projects) } @@ -417,7 +417,7 @@ RSpec.describe GroupPolicy do shared_examples_for 'not allowed to transfer projects' do before do - group.update(project_creation_level: project_creation_level) + group.update!(project_creation_level: project_creation_level) end it { is_expected.to be_disallowed(:transfer_projects) } @@ -491,7 +491,7 @@ RSpec.describe GroupPolicy do context 'create_projects' do context 'when group has no project creation level set' do before_all do - group.update(project_creation_level: nil) + group.update!(project_creation_level: nil) end context 'reporter' do @@ -521,7 +521,7 @@ RSpec.describe GroupPolicy do context 'when group has project creation level set to no one' do before_all do - group.update(project_creation_level: ::Gitlab::Access::NO_ONE_PROJECT_ACCESS) + group.update!(project_creation_level: ::Gitlab::Access::NO_ONE_PROJECT_ACCESS) end context 'reporter' do @@ -551,7 +551,7 @@ RSpec.describe GroupPolicy do context 'when group has project creation level set to maintainer only' do before_all do - group.update(project_creation_level: ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS) + group.update!(project_creation_level: ::Gitlab::Access::MAINTAINER_PROJECT_ACCESS) end context 'reporter' do @@ -581,7 +581,7 @@ RSpec.describe GroupPolicy do context 'when group has project creation level set to developers + maintainer' do before_all do - group.update(project_creation_level: ::Gitlab::Access::DEVELOPER_MAINTAINER_PROJECT_ACCESS) + group.update!(project_creation_level: ::Gitlab::Access::DEVELOPER_MAINTAINER_PROJECT_ACCESS) end context 'reporter' do @@ -613,7 +613,7 @@ RSpec.describe GroupPolicy do context 'create_subgroup' do context 'when group has subgroup creation level set to owner' do before_all do - group.update(subgroup_creation_level: ::Gitlab::Access::OWNER_SUBGROUP_ACCESS) + group.update!(subgroup_creation_level: ::Gitlab::Access::OWNER_SUBGROUP_ACCESS) end context 'reporter' do @@ -643,7 +643,7 @@ RSpec.describe GroupPolicy do context 'when group has subgroup creation level set to maintainer' do before_all do - group.update(subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS) + group.update!(subgroup_creation_level: ::Gitlab::Access::MAINTAINER_SUBGROUP_ACCESS) end context 'reporter' do @@ -752,7 +752,7 @@ RSpec.describe GroupPolicy do context 'which does not have design management enabled' do before do - project.update(lfs_enabled: false) + project.update!(lfs_enabled: false) end it { is_expected.not_to be_allowed(:read_design_activity) } |