diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-31 18:08:42 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-01-31 18:08:42 +0300 |
commit | c27acb1d376f7127cd33eadcc8f5683ed55262bc (patch) | |
tree | 685c31391dca71a73782b5c8626f4ef5b582dc21 /spec/support/migrations_helpers | |
parent | 1808454313ed75c92e1384466e8c83bfbc8ae25e (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/migrations_helpers')
-rw-r--r-- | spec/support/migrations_helpers/namespaces_helper.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/support/migrations_helpers/namespaces_helper.rb b/spec/support/migrations_helpers/namespaces_helper.rb new file mode 100644 index 00000000000..4ca01c87568 --- /dev/null +++ b/spec/support/migrations_helpers/namespaces_helper.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +module MigrationHelpers + module NamespacesHelpers + def create_namespace(name, visibility, options = {}) + table(:namespaces).create({ + name: name, + path: name, + type: 'Group', + visibility_level: visibility + }.merge(options)) + end + end +end |