Skip to content
Snippets Groups Projects
Commit 8007def6 authored by Guilhem CARRON's avatar Guilhem CARRON
Browse files

fix tests

parent 10a68619
No related branches found
No related tags found
1 merge request!19Feat/us858 save expiration date
Pipeline #42647 passed
const { isAlpha } = require('../../src/helpers/env')
const { isDev } = require('../../src/helpers/env')
describe('isAlpha', () => {
const OLD_ENV = process.env
......@@ -14,19 +14,19 @@ describe('isAlpha', () => {
it('should return false for local', () => {
// Set the variables
process.env.COZY_URL = 'http://cozy.tools:8080'
const reply = isAlpha()
expect(reply).toBe(false)
const reply = isDev()
expect(reply).toBe(true)
})
it('should return false for prod URL', () => {
// Set the variables
process.env.COZY_URL = 'https://pouet-ecolyo.cozygrandlyon.cloud/'
const reply = isAlpha()
const reply = isDev()
expect(reply).toBe(false)
})
it('should return true for alpha', () => {
// Set the variables
process.env.COZY_URL = 'https://pouet.cozy.self-data.alpha.grandlyon.com/'
const reply = isAlpha()
const reply = isDev()
expect(reply).toBe(true)
})
})
......@@ -2,5 +2,29 @@
"io.cozy.files": [],
"com.grandlyon.enedis.year": [],
"com.grandlyon.enedis.month": [],
"com.grandlyon.enedis.minute": []
"com.grandlyon.enedis.minute": [],
"io.cozy.accounts": [
{
"cozyMetadata": {
"doctypeVersion": 1,
"metadataVersion": 1,
"createdAt": "2022-09-27T09:28:57.802Z",
"createdByApp": "enedis-sge-grandlyon",
"createdByAppVersion": "1.0.1",
"updatedAt": "2022-09-27T09:32:18.359Z",
"updatedByApps": [
{
"slug": "enedis-sge-grandlyon",
"date": "2022-09-27T09:32:18.359Z",
"version": "1.0.1"
}
]
},
"_id": "1111111",
"account_type": "1111111",
"data": {
"name": "pouet"
}
}
]
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment