summaryrefslogtreecommitdiff
path: root/spec/models/namespaces
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-09-16 12:09:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-09-16 12:09:35 +0000
commit4c16d4ff4f92987f609e9853da5900a51f0ad1be (patch)
tree3ebc97c31f90db2f9c8fe4e5c5f33a502d68363d /spec/models/namespaces
parent3b85f5e4a123538b14eb052ae0efb9d7dbcd4e9b (diff)
downloadgitlab-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.rb4
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