1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-09 00:18:00 +01:00

test: remove last seen at assertion (#7487)

This commit is contained in:
Mateusz Kwasniewski 2024-06-28 15:18:16 +02:00 committed by GitHub
parent fe3c8eab3c
commit eaf68af2da
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 21 deletions

View File

@ -19,10 +19,7 @@ import EnvironmentService from '../../project-environments/environment-service';
import { ForbiddenError, PatternError, PermissionError } from '../../../error'; import { ForbiddenError, PatternError, PermissionError } from '../../../error';
import type { ISegmentService } from '../../segment/segment-service-interface'; import type { ISegmentService } from '../../segment/segment-service-interface';
import { createFeatureToggleService, createSegmentService } from '../..'; import { createFeatureToggleService, createSegmentService } from '../..';
import { import { insertLastSeenAt } from '../../../../test/e2e/helpers/test-helper';
insertFeatureEnvironmentsLastSeen,
insertLastSeenAt,
} from '../../../../test/e2e/helpers/test-helper';
import { EventService } from '../../../services'; import { EventService } from '../../../services';
let stores: IUnleashStores; let stores: IUnleashStores;
@ -689,8 +686,6 @@ test('Should return last seen at per environment', async () => {
const featureName = 'last-seen-at-per-env'; const featureName = 'last-seen-at-per-env';
const projectId = 'default'; const projectId = 'default';
const userName = 'last-seen-user';
await service.createFeatureToggle( await service.createFeatureToggle(
projectId, projectId,
{ {
@ -699,20 +694,6 @@ test('Should return last seen at per environment', async () => {
TEST_AUDIT_USER, TEST_AUDIT_USER,
); );
const date = await insertFeatureEnvironmentsLastSeen(
featureName,
db.rawDatabase,
);
const { environments, lastSeenAt } = await service.getFeature({
featureName,
projectId: 'default',
environmentVariants: false,
});
expect(environments[0].lastSeenAt).toEqual(new Date(date));
expect(lastSeenAt).toEqual(new Date(date));
// Test with feature flag on // Test with feature flag on
const config = createTestConfig(); const config = createTestConfig();