fix(contact): drop piece jointe not file
This commit is contained in:
parent
5a2ab37049
commit
e52aae420a
4 changed files with 23 additions and 0 deletions
|
@ -198,6 +198,16 @@ describe ContactController, question_type: :controller do
|
|||
expect(response.body).to include("un message")
|
||||
end
|
||||
end
|
||||
|
||||
context "with an invalid attachment type" do
|
||||
let(:params) { super().merge(piece_jointe: "not_a_file") }
|
||||
|
||||
it "returns unprocessable entity status" do
|
||||
subject
|
||||
expect(response).to have_http_status(:unprocessable_entity)
|
||||
expect(response.body).to include("La pièce jointe doit être un fichier")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue