Skip to content

Commit

Permalink
Remove build warnings in test (#138)
Browse files Browse the repository at this point in the history
Co-authored-by: Morten Bjerg Gregersen <[email protected]>
  • Loading branch information
MortenGregersen and MortenGregersen authored Oct 16, 2023
1 parent 30b59de commit ec62f7d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Tests/BagbutikSpecDecoderTests/SpecTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -853,15 +853,15 @@ final class SpecTests: XCTestCase {
XCTAssertTrue(bundleIdPlatformCaseValues.contains("SERVICES"))

guard case .object(let deviceSchema) = spec.components.schemas["Device"],
var deviceAttributesSchema: ObjectSchema = deviceSchema.subSchemas.compactMap({
let deviceAttributesSchema: ObjectSchema = deviceSchema.subSchemas.compactMap({
guard case .objectSchema(let subSchema) = $0,
subSchema.name == "Attributes" else {
return nil
}
return subSchema
}).first,
var statusProperty = deviceAttributesSchema.properties["status"],
case .enumSchema(var deviceStatusSchema) = statusProperty.type else {
let statusProperty = deviceAttributesSchema.properties["status"],
case .enumSchema(let deviceStatusSchema) = statusProperty.type else {
XCTFail(); return
}
let deviceStatusCaseValues = deviceStatusSchema.cases.map(\.value)
Expand Down

0 comments on commit ec62f7d

Please sign in to comment.