Skip to content

Commit

Permalink
Testing typo fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Nil2000 authored and rajdip-b committed Oct 13, 2024
1 parent 9663088 commit ea69bc2
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions apps/api/src/variable/variable.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ describe('Variable Controller Tests', () => {
let project1: Project
let environment1: Environment
let environment2: Environment

Check warning on line 55 in apps/api/src/variable/variable.e2e.spec.ts

View workflow job for this annotation

GitHub Actions / Validate API

'environment2' is assigned a value but never used
let environment3: Environment
let variable1: Variable

beforeAll(async () => {
Expand Down Expand Up @@ -124,6 +125,10 @@ describe('Variable Controller Tests', () => {
{
name: 'Environment 2',
description: 'Environment 2 description'
},
{
name: 'Test Environment',
description: 'Test environment description'
}
]
})) as Project
Expand All @@ -142,6 +147,13 @@ describe('Variable Controller Tests', () => {
}
})

environment3 = await prisma.environment.findFirst({
where: {
projectId: project1.id,
name: 'Test Environment'
}
})

variable1 = (await variableService.createVariable(
user1,
{
Expand Down Expand Up @@ -184,7 +196,7 @@ describe('Variable Controller Tests', () => {
entries: [
{
value: 'Variable 3 value',
environmentId: environment2.id
environmentId: environment3.id
}
]
},
Expand All @@ -205,7 +217,7 @@ describe('Variable Controller Tests', () => {
expect(body.versions.length).toBe(1)
expect(body.versions[0].value).toBe('Variable 3 value')
// expect(body.versions[0].environment.id).toBe(environment2.id)
expect(body.versions[0].environment.slug).toBe(environment2.slug)
expect(body.versions[0].environment.slug).toBe(environment3.slug)

const variable = await prisma.variable.findUnique({
where: {
Expand Down

0 comments on commit ea69bc2

Please sign in to comment.