Functional testing and session[:session_id]

You can use @request.session[:session_id] = user.id in the setup
method to artificially login in users for the functional tests.

Maybe line 21 should be

session_url(:id => session[:session_id], :method => :delete))
or
session_url(:id => current_user, :method => :delete)