@@ -35,7 +35,6 @@ class HoldoutTests: XCTestCase {
35
35
static var sampleData : [ String : Any ] = [ " id " : " 11111 " ,
36
36
" key " : " background " ,
37
37
" status " : " Running " ,
38
- " layerId " : " 22222 " ,
39
38
" variations " : [ HoldoutTests . variationData] ,
40
39
" trafficAllocation " : [ HoldoutTests . trafficAllocationData] ,
41
40
" audienceIds " : [ " 33333 " ] ,
@@ -44,7 +43,6 @@ class HoldoutTests: XCTestCase {
44
43
static var sampleDataWithIncludedFlags : [ String : Any ] = [ " id " : " 55555 " ,
45
44
" key " : " background " ,
46
45
" status " : " Running " ,
47
- " layerId " : " 22222 " ,
48
46
" variations " : [ HoldoutTests . variationData] ,
49
47
" trafficAllocation " : [ HoldoutTests . trafficAllocationData] ,
50
48
" audienceIds " : [ " 33333 " ] ,
@@ -54,7 +52,6 @@ class HoldoutTests: XCTestCase {
54
52
static var sampleDataWithExcludedFlags : [ String : Any ] = [ " id " : " 3333 " ,
55
53
" key " : " background " ,
56
54
" status " : " Running " ,
57
- " layerId " : " 22222 " ,
58
55
" variations " : [ HoldoutTests . variationData] ,
59
56
" trafficAllocation " : [ HoldoutTests . trafficAllocationData] ,
60
57
" audienceIds " : [ " 33333 " ] ,
@@ -76,7 +73,6 @@ extension HoldoutTests {
76
73
XCTAssert ( model. id == " 11111 " )
77
74
XCTAssert ( model. key == " background " )
78
75
XCTAssert ( model. status == . running)
79
- XCTAssert ( model. layerId == " 22222 " )
80
76
XCTAssert ( model. variations == [ try ! OTUtils . model ( from: HoldoutTests . variationData) ] )
81
77
XCTAssert ( model. trafficAllocation == [ try ! OTUtils . model ( from: HoldoutTests . trafficAllocationData) ] )
82
78
XCTAssert ( model. audienceIds == [ " 33333 " ] )
@@ -91,7 +87,6 @@ extension HoldoutTests {
91
87
XCTAssert ( model. id == " 55555 " )
92
88
XCTAssert ( model. key == " background " )
93
89
XCTAssert ( model. status == . running)
94
- XCTAssert ( model. layerId == " 22222 " )
95
90
XCTAssert ( model. variations == [ try ! OTUtils . model ( from: HoldoutTests . variationData) ] )
96
91
XCTAssert ( model. trafficAllocation == [ try ! OTUtils . model ( from: HoldoutTests . trafficAllocationData) ] )
97
92
XCTAssert ( model. audienceIds == [ " 33333 " ] )
@@ -107,7 +102,6 @@ extension HoldoutTests {
107
102
XCTAssert ( model. id == " 3333 " )
108
103
XCTAssert ( model. key == " background " )
109
104
XCTAssert ( model. status == . running)
110
- XCTAssert ( model. layerId == " 22222 " )
111
105
XCTAssert ( model. variations == [ try ! OTUtils . model ( from: HoldoutTests . variationData) ] )
112
106
XCTAssert ( model. trafficAllocation == [ try ! OTUtils . model ( from: HoldoutTests . trafficAllocationData) ] )
113
107
XCTAssert ( model. audienceIds == [ " 33333 " ] )
@@ -126,7 +120,6 @@ extension HoldoutTests {
126
120
XCTAssert ( model. id == " 11111 " )
127
121
XCTAssert ( model. key == " background " )
128
122
XCTAssert ( model. status == . running)
129
- XCTAssert ( model. layerId == " 22222 " )
130
123
XCTAssert ( model. variations == [ try ! OTUtils . model ( from: HoldoutTests . variationData) ] )
131
124
XCTAssert ( model. trafficAllocation == [ try ! OTUtils . model ( from: HoldoutTests . trafficAllocationData) ] )
132
125
XCTAssert ( model. audienceIds == [ " 33333 " ] )
@@ -156,14 +149,6 @@ extension HoldoutTests {
156
149
XCTAssertNil ( model)
157
150
}
158
151
159
- func testDecodeFailWithMissingLayerId( ) {
160
- var data : [ String : Any ] = HoldoutTests . sampleData
161
- data [ " layerId " ] = nil
162
-
163
- let model : Holdout ? = try ? OTUtils . model ( from: data)
164
- XCTAssertNil ( model)
165
- }
166
-
167
152
func testDecodeFailWithMissingVariations( ) {
168
153
var data : [ String : Any ] = HoldoutTests . sampleData
169
154
data [ " variations " ] = nil
@@ -203,7 +188,6 @@ extension HoldoutTests {
203
188
let commonData : [ String : Any ] = [ " id " : " 11111 " ,
204
189
" key " : " background " ,
205
190
" status " : " Running " ,
206
- " layerId " : " 22222 " ,
207
191
" variations " : [ HoldoutTests . variationData] ,
208
192
" trafficAllocation " : [ HoldoutTests . trafficAllocationData] ,
209
193
" audienceIds " : [ ] ,
0 commit comments