Skip to content

Commit

Permalink
ensure storage is cleared before adding a new one
Browse files Browse the repository at this point in the history
  • Loading branch information
stakach committed Sep 7, 2023
1 parent 45c6a51 commit a0aff63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/controllers/uploads_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ module PlaceOS::Api
end

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

it "should handle storage allowed list on post call" do
Model::Storage.clear
s = Model::Generator.storage
s.ext_filter << ".png"
s.ext_filter_will_change!
s.ext_filter << ".png"
s.save!
params = {
"file_name" => "some_file_name.jpg",
Expand Down

0 comments on commit a0aff63

Please sign in to comment.