File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Tests/AWSLambdaEventsTests Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public enum SQS {
39
39
public let messageAttributes : [ String : Attribute ]
40
40
public let eventSourceArn : String
41
41
public let eventSource : String
42
- public let awsRegion : String
42
+ public let awsRegion : AWSRegion
43
43
}
44
44
}
45
45
@@ -67,7 +67,7 @@ extension SQS.Message: Decodable {
67
67
self . messageAttributes = try container. decode ( [ String : Attribute ] . self, forKey: . messageAttributes)
68
68
self . eventSourceArn = try container. decode ( String . self, forKey: . eventSourceArn)
69
69
self . eventSource = try container. decode ( String . self, forKey: . eventSource)
70
- self . awsRegion = try container. decode ( String . self, forKey: . awsRegion)
70
+ self . awsRegion = try container. decode ( AWSRegion . self, forKey: . awsRegion)
71
71
72
72
let body = try container. decode ( String ? . self, forKey: . body)
73
73
self . body = body != " " ? body : nil
Original file line number Diff line number Diff line change @@ -82,6 +82,6 @@ class SQSTests: XCTestCase {
82
82
XCTAssertEqual ( message. md5OfBody, " 7b270e59b47ff90a553787216d55d91d " )
83
83
XCTAssertEqual ( message. eventSource, " aws:sqs " )
84
84
XCTAssertEqual ( message. eventSourceArn, " arn:aws:sqs:us-east-1:123456789012:MyQueue " )
85
- XCTAssertEqual ( message. awsRegion, " us-east-1 " )
85
+ XCTAssertEqual ( message. awsRegion, . us_east_1 )
86
86
}
87
87
}
You can’t perform that action at this time.
0 commit comments