diff options
author | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-06-14 12:27:33 -0400 |
---|---|---|
committer | Alejandro RodrÃguez <alejorro70@gmail.com> | 2016-06-14 12:32:51 -0400 |
commit | 98c5e6295b201eeaa760d104f9b43e237f1dbd49 (patch) | |
tree | 9769f7903dabe8b5f8745ced9eb9f1bcf6d7fee4 /spec/models/namespace_spec.rb | |
parent | c6cc7680e7da89c145b7e2075266791a3f594eec (diff) | |
download | gitlab-ce-shards-test.tar.gz |
Refactor repository paths handling to allow multiple git mount pointsshards-test
Diffstat (limited to 'spec/models/namespace_spec.rb')
-rw-r--r-- | spec/models/namespace_spec.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/models/namespace_spec.rb b/spec/models/namespace_spec.rb index 4e68ac5e63a..cbea407f9bf 100644 --- a/spec/models/namespace_spec.rb +++ b/spec/models/namespace_spec.rb @@ -57,6 +57,7 @@ describe Namespace, models: true do describe :move_dir do before do @namespace = create :namespace + @project = create :project, namespace: @namespace allow(@namespace).to receive(:path_changed?).and_return(true) end @@ -87,8 +88,13 @@ describe Namespace, models: true do end describe :rm_dir do - it "should remove dir" do - expect(namespace.rm_dir).to be_truthy + let!(:project) { create(:project, namespace: namespace) } + let!(:path) { File.join(Gitlab.config.repositories.storages.default, namespace.path) } + + before { namespace.destroy } + + it "should remove its dirs when deleted" do + expect(File.exist?(path)).to be(false) end end |