@@ -46,7 +46,7 @@ async fn test_get_item_query_text() {
46
46
match err {
47
47
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
48
48
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
49
- VintedWrapperError :: CookiesError ( _) => ( ) ,
49
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
50
50
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
51
51
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
52
52
}
@@ -78,7 +78,7 @@ async fn test_get_item_brands() {
78
78
match err {
79
79
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
80
80
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
81
- VintedWrapperError :: CookiesError ( _) => ( ) ,
81
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
82
82
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
83
83
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
84
84
}
@@ -107,7 +107,7 @@ async fn test_get_items_brands() {
107
107
match err {
108
108
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
109
109
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
110
- VintedWrapperError :: CookiesError ( _) => ( ) ,
110
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
111
111
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
112
112
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
113
113
}
@@ -147,7 +147,7 @@ async fn test_get_items_catalogs_no_db() {
147
147
match err {
148
148
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
149
149
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
150
- VintedWrapperError :: CookiesError ( _) => ( ) ,
150
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
151
151
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
152
152
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
153
153
}
@@ -170,7 +170,7 @@ async fn test_get_items_by_price() {
170
170
Ok ( items) => {
171
171
assert ! ( items. items. len( ) <= 10 ) ;
172
172
let ok: bool = items. items . iter ( ) . all ( |item| {
173
- let price: f32 = item. price . parse ( ) . unwrap ( ) ;
173
+ let price: f32 = item. price . amount . parse ( ) . unwrap ( ) ;
174
174
price <= max && price >= min
175
175
} ) ;
176
176
@@ -181,7 +181,7 @@ async fn test_get_items_by_price() {
181
181
match err {
182
182
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
183
183
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
184
- VintedWrapperError :: CookiesError ( _) => ( ) ,
184
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
185
185
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
186
186
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
187
187
}
@@ -209,7 +209,7 @@ async fn test_get_items_by_size_no_db() {
209
209
match err {
210
210
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
211
211
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
212
- VintedWrapperError :: CookiesError ( _) => ( ) ,
212
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
213
213
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
214
214
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
215
215
}
@@ -249,7 +249,7 @@ async fn test_get_items_by_size() {
249
249
match err {
250
250
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
251
251
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
252
- VintedWrapperError :: CookiesError ( _) => ( ) ,
252
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
253
253
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
254
254
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
255
255
}
@@ -277,7 +277,7 @@ async fn test_get_items_by_material() {
277
277
match err {
278
278
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
279
279
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
280
- VintedWrapperError :: CookiesError ( _) => ( ) ,
280
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
281
281
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
282
282
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
283
283
}
@@ -309,7 +309,7 @@ async fn test_get_items_by_color() {
309
309
match err {
310
310
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
311
311
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
312
- VintedWrapperError :: CookiesError ( _) => ( ) ,
312
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
313
313
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
314
314
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
315
315
}
@@ -333,7 +333,7 @@ async fn test_get_items_by_currency() {
333
333
assert ! ( items. items. len( ) <= num) ;
334
334
let ok: bool = items. items . iter ( ) . all ( |item| {
335
335
let c: & str = Currency :: CZK . into ( ) ;
336
- item. currency == c
336
+ item. price . currency_code == c
337
337
} ) ;
338
338
339
339
assert ! ( ok) ;
@@ -343,7 +343,7 @@ async fn test_get_items_by_currency() {
343
343
match err {
344
344
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
345
345
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
346
- VintedWrapperError :: CookiesError ( _) => ( ) ,
346
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
347
347
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
348
348
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
349
349
}
@@ -383,7 +383,7 @@ async fn test_get_advanced_items() {
383
383
match err {
384
384
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
385
385
VintedWrapperError :: ItemError ( _, _, _) => ( ) ,
386
- VintedWrapperError :: CookiesError ( _) => ( ) ,
386
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
387
387
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
388
388
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
389
389
}
@@ -397,7 +397,7 @@ async fn test_get_advanced_items() {
397
397
match err {
398
398
VintedWrapperError :: ItemNumberError => unreachable ! ( ) ,
399
399
VintedWrapperError :: ItemError ( _, _, _) => unreachable ! ( ) ,
400
- VintedWrapperError :: CookiesError ( _) => ( ) ,
400
+ VintedWrapperError :: CookiesError ( _) => unreachable ! ( ) ,
401
401
VintedWrapperError :: SerdeError ( _) => unreachable ! ( ) ,
402
402
VintedWrapperError :: ReqWestError ( _) => unreachable ! ( ) ,
403
403
}
0 commit comments