diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-05 06:08:44 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-06-05 06:08:44 +0300 |
commit | 0b320988a8c4fee1c92e78cd46c6dd11c6af7e18 (patch) | |
tree | 25d6d0827cbd4f84c249400ca734ab0d8cabc897 /spec | |
parent | f9959151a9a86b7b2fc8b17721877c62040a5e4e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec')
-rw-r--r-- | spec/factories/organizations/organizations.rb | 1 | ||||
-rw-r--r-- | spec/models/organizations/organization_spec.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/spec/factories/organizations/organizations.rb b/spec/factories/organizations/organizations.rb index 5e609cf3d49..c916b966abc 100644 --- a/spec/factories/organizations/organizations.rb +++ b/spec/factories/organizations/organizations.rb @@ -3,6 +3,7 @@ FactoryBot.define do factory :organization, class: 'Organizations::Organization' do sequence(:name) { |n| "Organization ##{n}" } + path { name.parameterize } trait :default do id { Organizations::Organization::DEFAULT_ORGANIZATION_ID } diff --git a/spec/models/organizations/organization_spec.rb b/spec/models/organizations/organization_spec.rb index fd4676fbfe3..bb3d0c2307d 100644 --- a/spec/models/organizations/organization_spec.rb +++ b/spec/models/organizations/organization_spec.rb @@ -16,6 +16,8 @@ RSpec.describe Organizations::Organization, type: :model, feature_category: :cel it { is_expected.to validate_presence_of(:name) } it { is_expected.to validate_length_of(:name).is_at_most(255) } + it { is_expected.to validate_presence_of(:path) } + it { is_expected.to validate_length_of(:path).is_at_least(2).is_at_most(255) } end context 'when using scopes' do |