func testGetUserProfileBadJSON()

in source/UberRidesTests/ObjectMappingTests.swift [349:360]


    func testGetUserProfileBadJSON() {
        let bundle = Bundle(for: ObjectMappingTests.self)
        if let path = bundle.path(forResource: "getMe", ofType: "json") {
            if let jsonData = try? Data(contentsOf: URL(fileURLWithPath: path)) {
                let JSONString = String(data: jsonData, encoding: String.Encoding.utf8)!
                let jsonData = JSONString.replacingOccurrences(of: "{", with: "").data(using: .utf8)!

                let userProfile = try? JSONDecoder.uberDecoder.decode(UserProfile.self, from: jsonData)
                XCTAssertNil(userProfile)
            }
        }
    }