You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
r.path.join("form.yml").write("--x-\nnot a valid form yaml")
app=BatchConnect::App.new(router: r)
assert ! app.valid?
}
end
However, this is really only checking if the app is valid?. As implemented now, the BatchConnect::App#valid? method does not check for malformed YAML, it only ensures that the form key is an Array and attributes is a Hash:
While working on #221 I noticed a test written that purports to check for malformed YAML already:
ondemand/apps/dashboard/test/models/batch_connect/app_test.rb
Lines 16 to 24 in ee50a5d
However, this is really only checking if the app is
valid?
. As implemented now, theBatchConnect::App#valid?
method does not check for malformed YAML, it only ensures that theform
key is anArray
andattributes
is aHash
:ondemand/apps/dashboard/app/models/batch_connect/app.rb
Lines 196 to 212 in ee50a5d
Fix
Rename this test to check if an batch connect app is
valid?
.Make test in #221 ensure the YAML and ERB errors are raised correctly instead of silent fails.
The text was updated successfully, but these errors were encountered: