-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The pre-engine version of this code relied on Hyrax config settings. This simplifies it so that it only uses `Rails.root` to determine the path.
- Loading branch information
Showing
2 changed files
with
32 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# frozen_string_literal: true | ||
require 'spec_helper' | ||
|
||
RSpec.describe Zizia::CsvManifestUploader, type: :model do | ||
subject(:csv_uploader) { described_class.new } | ||
|
||
it 'has a a store dir' do | ||
expect(csv_uploader.store_dir.to_s).to match(/uploads/) | ||
end | ||
|
||
it 'has a cache dir' do | ||
expect(csv_uploader.cache_dir.to_s).to match(/cache/) | ||
end | ||
|
||
it 'has an extension whitelist' do | ||
expect(csv_uploader.extension_whitelist).to eq(%w[csv]) | ||
end | ||
|
||
it 'returns an empty array if the validator has no errors' do | ||
expect(csv_uploader.errors).to eq([]) | ||
end | ||
|
||
it 'has warnings' do | ||
expect(csv_uploader.warnings).to eq([]) | ||
end | ||
|
||
it 'has records' do | ||
expect(csv_uploader.records).to eq(0) | ||
end | ||
end |