Title / Description
Code describe 'permit some elements from params and miss others' do before do @params = ActionController::Parameters.new @hash end it 'should log non-permitted attributes' do ActiveSupport::Notifications. expects(:instrument). with('unpermitted_parameters.action_controller', keys: ['body']). once @params.permit(:title).must_equal 'title' => 'Test' end end
Author
Highlight as C C++ CSS Clojure Delphi ERb Groovy (beta) HAML HTML JSON Java JavaScript PHP Plain text Python Ruby SQL XML YAML diff code