summaryrefslogtreecommitdiff
path: root/spec/models
diff options
context:
space:
mode:
Diffstat (limited to 'spec/models')
-rw-r--r--spec/models/group_spec.rb4
-rw-r--r--spec/models/project_spec.rb4
2 files changed, 4 insertions, 4 deletions
diff --git a/spec/models/group_spec.rb b/spec/models/group_spec.rb
index 68e213f4816..7bfca1e72c3 100644
--- a/spec/models/group_spec.rb
+++ b/spec/models/group_spec.rb
@@ -67,9 +67,9 @@ describe Group, models: true do
end
describe 'public_and_internal_only' do
- subject { described_class.public_and_internal_only.to_a.sort }
+ subject { described_class.public_and_internal_only.to_a }
- it{ is_expected.to eq([group, internal_group].sort) }
+ it{ is_expected.to match_array([group, internal_group]) }
end
end
diff --git a/spec/models/project_spec.rb b/spec/models/project_spec.rb
index 757324184bd..20f06f4b7e1 100644
--- a/spec/models/project_spec.rb
+++ b/spec/models/project_spec.rb
@@ -721,8 +721,8 @@ describe Project, models: true do
let(:private_group) { create(:group, visibility_level: 0) }
let(:internal_group) { create(:group, visibility_level: 10) }
- let(:private_project) { create :project, group: private_group, visibility_level: Gitlab::VisibilityLevel::PRIVATE }
- let(:internal_project) { create :project, group: internal_group, visibility_level: Gitlab::VisibilityLevel::INTERNAL }
+ let(:private_project) { create :project, :private, group: private_group }
+ let(:internal_project) { create :project, :internal, group: internal_group }
context 'when group is private project can not be internal' do
it { expect(private_project.visibility_level_allowed?(Gitlab::VisibilityLevel::INTERNAL)).to be_falsey }