]> git.openstreetmap.org Git - rails.git/blobdiff - test/test_helper.rb
Refactor site controller tests to inherit from ActionDispatch::IntegrationTest
[rails.git] / test / test_helper.rb
index c19b809ecbcd102e4f606afa29a395ecfd2d681a..a5ea127f6b44785dac44cb67e4530431addaa51c 100644 (file)
@@ -185,6 +185,11 @@ module ActiveSupport
       click_on "Login", :match => :first
     end
 
+    def session_for(user)
+      post login_path, :params => { :username => user.display_name, :password => "test" }
+      follow_redirect!
+    end
+
     def xml_for_node(node)
       doc = OSM::API.new.get_xml_doc
       doc.root << xml_node_for_node(node)