Revision c66621c5
Added by Brad Buckingham about 10 years ago
test/controllers/api/v2/content_view_filters_controller_test.rb | ||
---|---|---|
def test_destroy
|
||
delete :destroy, :content_view_id => @filter.content_view_id, :id => @filter.id
|
||
|
||
results = JSON.parse(response.body)
|
||
refute results.blank?
|
||
assert_equal results['id'], @filter.id
|
||
|
||
assert_response :success
|
||
assert_nil ContentViewFilter.find_by_id(@filter.id)
|
||
end
|
Also available in: Unified diff
fixes #4892 - content view filters & rules api - return object on DELETE
When a content view filter or rule is deleted with the API, return
the object that is being deleted.
This is correct behavior according to the API documentation and
is assumed behavior for the UI to properly update lists during
a deletion.