summaryrefslogtreecommitdiff
path: root/spec/lib
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2018-08-31 13:11:36 +0000
committerDouwe Maan <douwe@gitlab.com>2018-08-31 13:11:36 +0000
commit472f2d566633df6c1dee1f703b06958b9a0a2cd8 (patch)
treed1cd43bb01dc89f772ea9ec622e6edffd8f45f67 /spec/lib
parent74c53ef6e64299fb6b2030094725a9c0265421f4 (diff)
parent6dfab422368f54aff5f976c65e860332236bbf5c (diff)
downloadgitlab-ce-472f2d566633df6c1dee1f703b06958b9a0a2cd8.tar.gz
Merge branch '47765-group-visibility-error-due-to-string-conversion' into 'master'
Changes update_column to update_attributes in ProjectTreeRestorer#restore_project by using timeless to maintain the current timestamps Closes #47765 See merge request gitlab-org/gitlab-ce!21242
Diffstat (limited to 'spec/lib')
-rw-r--r--spec/lib/gitlab/import_export/importer_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/lib/gitlab/import_export/importer_spec.rb b/spec/lib/gitlab/import_export/importer_spec.rb
index f07946824c4..8053c48ad6c 100644
--- a/spec/lib/gitlab/import_export/importer_spec.rb
+++ b/spec/lib/gitlab/import_export/importer_spec.rb
@@ -63,6 +63,16 @@ describe Gitlab::ImportExport::Importer do
importer.execute
end
+
+ it 'sets the correct visibility_level when visibility level is a string' do
+ project.create_or_update_import_data(
+ data: { override_params: { visibility_level: Gitlab::VisibilityLevel::PRIVATE.to_s } }
+ )
+
+ importer.execute
+
+ expect(project.visibility_level).to eq(Gitlab::VisibilityLevel::PRIVATE)
+ end
end
context 'when project successfully restored' do