diff --git a/config/default.json b/config/default.json index bdf1e17..dfe820e 100755 --- a/config/default.json +++ b/config/default.json @@ -23,6 +23,9 @@ "method": "POST", "endpoint": "/api/identity" }, + { + "endpoint": "/heartbeat" + }, { "endpoint": "/api/notification.*" }, diff --git a/cucumber/features/heartbeat.feature b/cucumber/features/heartbeat.feature index 8e83874..1c9b67c 100755 --- a/cucumber/features/heartbeat.feature +++ b/cucumber/features/heartbeat.feature @@ -1,12 +1,5 @@ Feature: Notifications component sends a 204 to confirm it is running - Scenario Outline: get the status of the notifications server - Given an authenticated identity in the app with + Scenario: get the status of the notifications server When a user makes a GET to /heartbeat Then the backend responds with 204 - - Examples: - | identity_id | - | 01f0000000000000003f0001 | - | 01f0000000000000003f0002 | - | 01f0000000000000003f0003 | diff --git a/cucumber/features/step_definitions/request_steps.js b/cucumber/features/step_definitions/request_steps.js index a9a3758..c347efb 100755 --- a/cucumber/features/step_definitions/request_steps.js +++ b/cucumber/features/step_definitions/request_steps.js @@ -9,9 +9,9 @@ module.exports = function() { this.When(/^a user makes a GET to (.*)$/, function(endpoint, callback) { this.register('url', endpoint); - const request = this.buildRequest('GET', endpoint, { - 'x-user-id': this.get('identity') - }); + const headers = this.get('identity') ? { 'x-user-id': this.get('identity')} : {}; + + const request = this.buildRequest('GET', endpoint, headers); this.register('request', request); return callback(); diff --git a/test/middlewares/check_identity.js b/test/middlewares/check_identity.js index 5cc26e6..734c06b 100755 --- a/test/middlewares/check_identity.js +++ b/test/middlewares/check_identity.js @@ -9,10 +9,10 @@ const loadFixtures = require('./../../scripts/load_fixtures'); describe('Identity middleware', function() { - const hearbeatUrl = '/heartbeat'; + const fetchIdentityUrl = '/api/identity'; let request = { - url: hearbeatUrl, + url: fetchIdentityUrl, method: 'GET', headers: {} };