diff options
| author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-16 12:09:35 +0000 |
|---|---|---|
| committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-16 12:09:35 +0000 |
| commit | 4c16d4ff4f92987f609e9853da5900a51f0ad1be (patch) | |
| tree | 3ebc97c31f90db2f9c8fe4e5c5f33a502d68363d /spec/models/namespaces | |
| parent | 3b85f5e4a123538b14eb052ae0efb9d7dbcd4e9b (diff) | |
| download | gitlab-ce-4c16d4ff4f92987f609e9853da5900a51f0ad1be.tar.gz | |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/models/namespaces')
| -rw-r--r-- | spec/models/namespaces/project_namespace_spec.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/models/namespaces/project_namespace_spec.rb b/spec/models/namespaces/project_namespace_spec.rb index 11bdca54b70..f38e8aa85d0 100644 --- a/spec/models/namespaces/project_namespace_spec.rb +++ b/spec/models/namespaces/project_namespace_spec.rb @@ -7,6 +7,10 @@ RSpec.describe Namespaces::ProjectNamespace, type: :model do it { is_expected.to have_one(:project).with_foreign_key(:project_namespace_id).inverse_of(:project_namespace) } end + describe 'validations' do + it { is_expected.not_to validate_presence_of :owner } + end + context 'when deleting project namespace' do # using delete rather than destroy due to `delete` skipping AR hooks/callbacks # so it's ensured to work at the DB level. Uses ON DELETE CASCADE on foreign key |
