Skip to content
Snippets Groups Projects
Unverified Commit 85cef03a authored by Sébastien Gaya's avatar Sébastien Gaya
Browse files

test experiences invalid

parent 7a366369
No related branches found
No related tags found
No related merge requests found
......@@ -22,6 +22,19 @@ class Extranet::ExperiencesControllerTest < ActionDispatch::IntegrationTest
end
end
def test_create_invalid
assert_no_difference("alumnus.experiences.count") do
post experiences_path, params: {
university_person_experience: {
description: "Stage",
from_year: 2022,
to_year: 2022
}
}
assert_response(:success)
end
end
def test_edit
get edit_experience_path(university_person_experiences(:default_experience))
assert_response(:success)
......@@ -40,4 +53,15 @@ class Extranet::ExperiencesControllerTest < ActionDispatch::IntegrationTest
assert_equal("Alternance", experience.reload.description)
end
def test_update_invalid
experience = university_person_experiences(:default_experience)
patch experience_path(experience), params: {
university_person_experience: {
organization_id: ""
}
}
assert_response(:success)
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment