|
8 | 8 | $config = new Config('test_api_token'); |
9 | 9 |
|
10 | 10 | expect($config->apiToken)->toBe('test_api_token') |
11 | | - ->and($config->placesActorId)->toBe('zen-studio/2gis-places-scraper-api') |
12 | | - ->and($config->reviewsActorId)->toBe('zen-studio/2gis-reviews-scraper') |
13 | | - ->and($config->propertyActorId)->toBe('zen-studio/2gis-property-scraper') |
14 | | - ->and($config->jobsActorId)->toBe('zen-studio/2gis-jobs-scraper') |
15 | 11 | ->and($config->baseUrl)->toBe('https://api.apify.com/v2') |
16 | 12 | ->and($config->timeout)->toBe(900); |
17 | 13 | }); |
18 | 14 |
|
19 | 15 | it('accepts custom values', function () { |
20 | 16 | $config = new Config( |
21 | 17 | apiToken: 'custom_token', |
22 | | - placesActorId: 'custom/places-actor', |
23 | | - reviewsActorId: 'custom/reviews-actor', |
24 | | - propertyActorId: 'custom/property-actor', |
25 | | - jobsActorId: 'custom/jobs-actor', |
26 | 18 | baseUrl: 'https://custom.api.com/v2', |
27 | 19 | timeout: 600, |
28 | 20 | ); |
29 | 21 |
|
30 | 22 | expect($config->apiToken)->toBe('custom_token') |
31 | | - ->and($config->placesActorId)->toBe('custom/places-actor') |
32 | | - ->and($config->reviewsActorId)->toBe('custom/reviews-actor') |
33 | | - ->and($config->propertyActorId)->toBe('custom/property-actor') |
34 | | - ->and($config->jobsActorId)->toBe('custom/jobs-actor') |
35 | 23 | ->and($config->baseUrl)->toBe('https://custom.api.com/v2') |
36 | 24 | ->and($config->timeout)->toBe(600); |
37 | 25 | }); |
| 26 | + |
| 27 | +it('has hardcoded actor IDs', function () { |
| 28 | + expect(Config::PLACES_ACTOR_ID)->toBe('zen-studio/2gis-places-scraper-api') |
| 29 | + ->and(Config::REVIEWS_ACTOR_ID)->toBe('zen-studio/2gis-reviews-scraper') |
| 30 | + ->and(Config::PROPERTY_ACTOR_ID)->toBe('zen-studio/2gis-property-scraper') |
| 31 | + ->and(Config::JOBS_ACTOR_ID)->toBe('zen-studio/2gis-jobs-scraper'); |
| 32 | +}); |
0 commit comments