Skip to content

Commit

Permalink
cleanup spec
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Sep 7, 2023
1 parent a0aff63 commit 3f3884f
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions spec/controllers/uploads_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ require "../helper"

module PlaceOS::Api
describe Uploads do
Spec.before_each do
Model::Storage.clear
end

it "new should return the Storage Provider" do
Model::Generator.storage.save!
params = HTTP::Params.encode({
Expand All @@ -18,9 +22,7 @@ module PlaceOS::Api
end

it "should handle storage allowed list on get call" do
Model::Storage.clear
s = Model::Generator.storage
s.ext_filter_will_change!
s.ext_filter << "jpg"
s.save!
params = HTTP::Params.encode({
Expand All @@ -36,9 +38,7 @@ module PlaceOS::Api
end

it "should handle storage allowed list on post call" do
Model::Storage.clear
s = Model::Generator.storage
s.ext_filter_will_change!
s.ext_filter << ".png"
s.save!
params = {
Expand All @@ -56,7 +56,6 @@ module PlaceOS::Api
end

it "post should return the pre-signed signature" do
Model::Storage.clear
Model::Generator.storage.save!
params = {
"file_name" => "some_file_name.jpg",
Expand All @@ -79,7 +78,6 @@ module PlaceOS::Api
end

it "post should return the pre-signed signature for multi-part" do
Model::Storage.clear
Model::Generator.storage.save!
params = {
"file_name" => "some_file_name.jpg",
Expand All @@ -103,7 +101,6 @@ module PlaceOS::Api
end

it "should handle upload visibility" do
Model::Storage.clear
Model::Generator.storage.save!
params = {
"file_name" => "some_file_name.jpg",
Expand Down

0 comments on commit 3f3884f

Please sign in to comment.