]> git.openstreetmap.org Git - rails.git/blobdiff - test/test_helper.rb
Move document-level styling for iD to its stylesheet
[rails.git] / test / test_helper.rb
index 08f01e8e7d488c21c2b9493ca74434b5a82516ee..a5ea127f6b44785dac44cb67e4530431addaa51c 100644 (file)
@@ -28,6 +28,9 @@ module ActiveSupport
     include FactoryBot::Syntax::Methods
     include ActiveJob::TestHelper
 
+    # Run tests in parallel with specified workers
+    parallelize(:workers => :number_of_processors)
+
     ##
     # takes a block which is executed in the context of a different
     # ActionController instance. this is used so that code can call methods
@@ -182,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)