test/rails_root/test/shoulda_macros/controller.rb in muck-profiles-0.1.13 vs test/rails_root/test/shoulda_macros/controller.rb in muck-profiles-0.1.14

- old
+ new

@@ -3,10 +3,14 @@ def should_require_login(*args) args = Hash[*args] login_url = args.delete :login_url args.each do |action, verb| should "Require login for '#{action}' action" do - send(verb, action) + if [:put, :delete].include?(verb) # put and delete require an id even if it is a bogus one + send(verb, action, :id => 1) + else + send(verb, action) + end assert_redirected_to(login_url) end end end