Skip to content

Commit

Permalink
Merge pull request #6 from companieshouse/root-path
Browse files Browse the repository at this point in the history
fixed root path in paths.ts and docker-compose
  • Loading branch information
naufalmirk authored Jun 4, 2020
2 parents 0068a4a + 83f07e0 commit d80fb54
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
build: .
image: dissolution-web:1.0
labels:
- traefik.http.routers.dissolution-web.rule=Host(`chs-dev`) && PathPrefix(`/dissolution-web/`)
- traefik.http.routers.dissolution-web.rule=Host(`chs-dev`) && PathPrefix(`/close-a-company/`)
ports:
- 3000:3000
networks:
Expand Down
4 changes: 2 additions & 2 deletions src/paths.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const ROOT_URI = ''
export const ROOT_URI = '/close-a-company'

export const HEALTHCHECK_URI = `${ROOT_URI}/healthcheck`

// Pages
export const FORM_PAGE_URI = `${ROOT_URI}/form`
export const FORM_PAGE_URI = `${ROOT_URI}/form`
2 changes: 1 addition & 1 deletion test/controllers/form.controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('FormController', () => {

const res = await request(app).post(FORM_PAGE_URI).send(testObject).expect(MOVED_TEMPORARILY)

assert.include(res.text, 'Found. Redirecting to /form')
assert.include(res.text, 'Found. Redirecting to /close-a-company/form')
})
})

Expand Down
2 changes: 1 addition & 1 deletion test/controllers/landing.controller.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const app: Application = createApp()

describe('LandingController', () => {
it('should render the landing page', async () => {
const res = await request(app).get('/').expect(OK)
const res = await request(app).get('/close-a-company').expect(OK)

assert.include(res.text, 'Use this service to get your NodeJS application up and running.')
})
Expand Down

0 comments on commit d80fb54

Please sign in to comment.