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
@request.env["HTTP_AUTHORIZATION"] = format("Basic %{auth}", :auth => Base64.encode64("#{user}:#{pass}"))
end
+ ##
+ # set request header for HTTP Accept
+ def http_accept_format(format)
+ @request.env["HTTP_ACCEPT"] = format
+ end
+
##
# set request readers to ask for a particular error format
def error_format(format)
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)