Project

General

Profile

« Previous | Next » 

Revision 8076e753

Added by Ondřej Pražák over 8 years ago

Fixes #11693 - removed 'destroy' for smart class parameter from API controllers

View differences:

test/functional/api/v1/lookup_keys_controller_test.rb
assert_response :success
end
test "should destroy lookup_keys" do
assert_difference('LookupKey.count', -1) do
test "should not destroy PuppetclassLookupKey" do
assert_difference('LookupKey.count', 0) do
delete :destroy, { :id => lookup_keys(:one).to_param }
end
assert_response 422
end
test "should destroy VariableLookupKey" do
assert_difference('LookupKey.count', -1) do
delete :destroy, { :id => lookup_keys(:two).to_param }
end
assert_response :success
end
end

Also available in: Unified diff