module ActiveSupport
class TestCase
+ include FactoryGirl::Syntax::Methods
+
# Load standard fixtures needed to test API methods
def self.api_fixtures
# print "setting up the api_fixtures"
- fixtures :users, :user_roles, :user_blocks
- fixtures :changesets, :changeset_tags, :changeset_comments
+ fixtures :users, :user_roles
+ fixtures :changesets, :changeset_tags
fixtures :current_nodes, :nodes
set_fixture_class :current_nodes => Node
set_fixture_class :relation_members => OldRelationMember
set_fixture_class :relation_tags => OldRelationTag
- fixtures :gpx_files, :gps_points, :gpx_file_tags
- set_fixture_class :gpx_files => Trace
- set_fixture_class :gps_points => Tracepoint
- set_fixture_class :gpx_file_tags => Tracetag
-
fixtures :client_applications
fixtures :redactions
-
- fixtures :notes, :note_comments
end
##
OSM.http_client = Faraday.new do |builder|
builder.adapter :test do |stub|
- stubs.each do |url, body|
- stub.get(url) { |_env| [200, {}, body] }
+ stubs.each do |url, response|
+ stub.get(url) { |_env| [response["code"], {}, response["body"]] }
end
end
end