|
1 | 1 | const sinon = require('sinon');
|
2 | 2 | const should = require('should');
|
3 |
| -const TopContentStatsService = require('../../../../../core/server/services/stats/ContentStatsService'); |
| 3 | +const ContentStatsService = require('../../../../../core/server/services/stats/ContentStatsService'); |
4 | 4 | const tinybird = require('../../../../../core/server/services/stats/utils/tinybird');
|
5 | 5 |
|
6 | 6 | describe('TopContentStatsService', function () {
|
@@ -35,7 +35,7 @@ describe('TopContentStatsService', function () {
|
35 | 35 | sinon.stub(tinybird, 'create').returns(mockTinybirdClient);
|
36 | 36 |
|
37 | 37 | // Create service instance with mocked dependencies
|
38 |
| - service = new TopContentStatsService({ |
| 38 | + service = new ContentStatsService({ |
39 | 39 | knex: mockKnex,
|
40 | 40 | urlService: mockUrlService,
|
41 | 41 | tinybirdClient: mockTinybirdClient
|
@@ -159,7 +159,7 @@ describe('TopContentStatsService', function () {
|
159 | 159 | describe('getResourceTitle', function () {
|
160 | 160 | it('returns null if urlService is not available', function () {
|
161 | 161 | // Create service without urlService
|
162 |
| - const serviceNoUrl = new TopContentStatsService({ |
| 162 | + const serviceNoUrl = new ContentStatsService({ |
163 | 163 | knex: mockKnex,
|
164 | 164 | urlService: null
|
165 | 165 | });
|
@@ -419,7 +419,7 @@ describe('TopContentStatsService', function () {
|
419 | 419 |
|
420 | 420 | it('returns empty data array when tinybirdClient is not available', async function () {
|
421 | 421 | // Create a service without tinybirdClient
|
422 |
| - const serviceNoTinybird = new TopContentStatsService({ |
| 422 | + const serviceNoTinybird = new ContentStatsService({ |
423 | 423 | knex: mockKnex,
|
424 | 424 | urlService: mockUrlService
|
425 | 425 | });
|
|
0 commit comments