diff options
author | Nick Thomas <nick@gitlab.com> | 2017-12-01 13:58:49 +0000 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2018-02-07 13:40:46 +0000 |
commit | 6b0c6e69e1b249f14624550fcbca7f5ee6f51410 (patch) | |
tree | 0a724fbb80c728e64a4b445f1a798f035502dd9a /spec/uploaders | |
parent | ead97c55eac773444dee547a934112aa282c2e2e (diff) | |
download | gitlab-ce-6b0c6e69e1b249f14624550fcbca7f5ee6f51410.tar.gz |
Use hashed storage in the specs40744-hashed-storage-specs
Diffstat (limited to 'spec/uploaders')
-rw-r--r-- | spec/uploaders/file_uploader_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/uploaders/file_uploader_spec.rb b/spec/uploaders/file_uploader_spec.rb index 6a92e7fae51..b42ce982b27 100644 --- a/spec/uploaders/file_uploader_spec.rb +++ b/spec/uploaders/file_uploader_spec.rb @@ -2,7 +2,7 @@ require 'spec_helper' describe FileUploader do let(:group) { create(:group, name: 'awesome') } - let(:project) { create(:project, namespace: group, name: 'project') } + let(:project) { create(:project, :legacy_storage, namespace: group, name: 'project') } let(:uploader) { described_class.new(project) } let(:upload) { double(model: project, path: 'secret/foo.jpg') } @@ -16,12 +16,12 @@ describe FileUploader do shared_examples 'uses hashed storage' do context 'when rolled out attachments' do + let(:project) { build_stubbed(:project, namespace: group, name: 'project') } + before do allow(project).to receive(:disk_path).and_return('ca/fe/fe/ed') end - let(:project) { build_stubbed(:project, :hashed, namespace: group, name: 'project') } - it_behaves_like 'builds correct paths', store_dir: %r{ca/fe/fe/ed/\h+}, absolute_path: %r{#{described_class.root}/ca/fe/fe/ed/secret/foo.jpg} |