Initial commit

This commit is contained in:
Senad Uka
2020-05-31 22:38:19 +02:00
commit 858fafc3c5
1280 changed files with 65918 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
require "rails_helper"
RSpec.describe DropzoneHelper, type: :helper do
describe "#dropzone_accepted_files_for" do
it "accepts image files for appearance releases" do
releasable = build(:appearance_release)
expect(helper.dropzone_accepted_files_for(releasable)).to eq("image/*")
end
it "accepts image files for talent releases" do
releasable = build(:talent_release)
expect(helper.dropzone_accepted_files_for(releasable)).to eq("image/*")
end
it "accepts image files for location releases" do
releasable = build(:location_release)
expect(helper.dropzone_accepted_files_for(releasable)).to eq("image/*")
end
it "accepts image files for material releases" do
releasable = build(:material_release)
expect(helper.dropzone_accepted_files_for(releasable)).to eq("image/*")
end
it "accepts audio files for music releases" do
releasable = build(:music_release)
expect(helper.dropzone_accepted_files_for(releasable)).to eq("audio/*")
end
it "accepts any file for acquired media releases" do
releasable = build(:acquired_media_release)
expect(helper.dropzone_accepted_files_for(releasable)).to be_nil
end
end
end