mirror of
https://github.com/we-promise/sure.git
synced 2026-09-05 06:41:08 +00:00
fb47e40247
* Fix(lunchflow): Missing template on validation failure in create action * Test invalid Lunchflow connection creation --------- Co-authored-by: sentry[bot] <39604003+sentry[bot]@users.noreply.github.com> Co-authored-by: Juan José Mata <juanjo.mata@gmail.com>
22 lines
559 B
Ruby
22 lines
559 B
Ruby
require "test_helper"
|
|
|
|
class LunchflowItemsControllerTest < ActionDispatch::IntegrationTest
|
|
setup do
|
|
sign_in @user = users(:family_admin)
|
|
end
|
|
|
|
test "invalid non-Turbo create redirects instead of rendering a missing template" do
|
|
assert_no_difference "LunchflowItem.count" do
|
|
post lunchflow_items_url, params: {
|
|
lunchflow_item: {
|
|
name: "Invalid Lunchflow connection",
|
|
api_key: ""
|
|
}
|
|
}
|
|
end
|
|
|
|
assert_redirected_to accounts_path
|
|
assert_match "Api key can't be blank", flash[:alert]
|
|
end
|
|
end
|