Skip to content

Commit

Permalink
fix form answer attachment spec
Browse files Browse the repository at this point in the history
  • Loading branch information
sammo1235 committed Oct 4, 2024
1 parent f1ee33f commit d4e1a91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec/models/form_answer_attachment_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@

context "scan" do
it "should scan new file" do
expect_any_instance_of(FormAnswerAttachment).to receive(:scan_file!)
expect_any_instance_of(FormAnswerAttachment).to receive(:perform_virus_scan)
create(:form_answer_attachment, question_key: "org_chart")
end

it "should not scan if the file is infected and removed" do
attachment = create(:form_answer_attachment, question_key: "org_chart")
expect_any_instance_of(FormAnswerAttachment).not_to receive(:scan_file_without_cleanup!)
expect_any_instance_of(FormAnswerAttachment).not_to receive(:scan_file!)
attachment.remove_file!
attachment.save!
end
Expand Down

0 comments on commit d4e1a91

Please sign in to comment.