diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-11-17 14:33:21 +0300 |
commit | 7021455bd1ed7b125c55eb1b33c5a01f2bc55ee0 (patch) | |
tree | 5bdc2229f5198d516781f8d24eace62fc7e589e9 /spec/models/namespace_spec.rb | |
parent | 185b095e93520f96e9cfc31d9c3e69b498cdab7c (diff) |
Add latest changes from gitlab-org/gitlab@15-6-stable-eev15.6.0-rc42
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r-- | spec/models/namespace_spec.rb | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index c6d028af22d..0516d446945 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -1623,7 +1623,7 @@ RSpec.describe Namespace do describe '#share_with_group_lock with subgroups' do context 'when creating a subgroup' do - let(:subgroup) { create(:group, parent: root_group ) } + let(:subgroup) { create(:group, parent: root_group) } context 'under a parent with "Share with group lock" enabled' do let(:root_group) { create(:group, share_with_group_lock: true) } @@ -1644,7 +1644,7 @@ RSpec.describe Namespace do context 'when enabling the parent group "Share with group lock"' do let(:root_group) { create(:group) } - let!(:subgroup) { create(:group, parent: root_group ) } + let!(:subgroup) { create(:group, parent: root_group) } it 'the subgroup "Share with group lock" becomes enabled' do root_group.update!(share_with_group_lock: true) @@ -1657,7 +1657,7 @@ RSpec.describe Namespace do let(:root_group) { create(:group, share_with_group_lock: true) } context 'and the subgroup "Share with group lock" is enabled' do - let(:subgroup) { create(:group, parent: root_group, share_with_group_lock: true ) } + let(:subgroup) { create(:group, parent: root_group, share_with_group_lock: true) } it 'the subgroup "Share with group lock" does not change' do root_group.update!(share_with_group_lock: false) @@ -1667,7 +1667,7 @@ RSpec.describe Namespace do end context 'but the subgroup "Share with group lock" is disabled' do - let(:subgroup) { create(:group, parent: root_group ) } + let(:subgroup) { create(:group, parent: root_group) } it 'the subgroup "Share with group lock" does not change' do root_group.update!(share_with_group_lock: false) @@ -1682,7 +1682,7 @@ RSpec.describe Namespace do let(:root_group) { create(:group, share_with_group_lock: true) } context 'when the subgroup "Share with group lock" is enabled' do - let(:subgroup) { create(:group, share_with_group_lock: true ) } + let(:subgroup) { create(:group, share_with_group_lock: true) } it 'the subgroup "Share with group lock" does not change' do subgroup.parent = root_group @@ -1708,7 +1708,7 @@ RSpec.describe Namespace do let(:root_group) { create(:group) } context 'when the subgroup "Share with group lock" is enabled' do - let(:subgroup) { create(:group, share_with_group_lock: true ) } + let(:subgroup) { create(:group, share_with_group_lock: true) } it 'the subgroup "Share with group lock" does not change' do subgroup.parent = root_group @@ -1826,7 +1826,7 @@ RSpec.describe Namespace do group.update!(parent: parent) - expect(group.full_path_before_last_save).to eq("#{group.path_before_last_save}") + expect(group.full_path_before_last_save).to eq(group.path_before_last_save.to_s) end end @@ -2356,7 +2356,7 @@ RSpec.describe Namespace do end end - describe 'storage_enforcement_date' do + describe 'storage_enforcement_date', :freeze_time do let_it_be(:namespace) { create(:group) } before do @@ -2364,7 +2364,7 @@ RSpec.describe Namespace do end it 'returns correct date' do - expect(namespace.storage_enforcement_date).to eql(Date.new(2022, 10, 19)) + expect(namespace.storage_enforcement_date).to eql(3.months.from_now.to_date) end context 'when :storage_banner_bypass_date_check is enabled' do @@ -2372,7 +2372,7 @@ RSpec.describe Namespace do stub_feature_flags(namespace_storage_limit_bypass_date_check: true) end - it 'returns the current date', :freeze_time do + it 'returns the current date' do expect(namespace.storage_enforcement_date).to eq(Date.current) end end |