Project

General

Profile

« Previous | Next » 

Revision 0804d857

Added by Dominic Cleal over 7 years ago

refs #16982 - pass ID, not models into model.find

View differences:

test/controllers/subnets_controller_test.rb
def test_update_valid
Subnet.any_instance.stubs(:valid?).returns(true)
put :update, {:id => @model, :subnet => {:network => '192.168.100.10'}}, set_session_user
assert_equal '192.168.100.10', Subnet.unscoped.find(@model).network
assert_equal '192.168.100.10', Subnet.unscoped.find(@model.id).network
assert_redirected_to subnets_url
end

Also available in: Unified diff