Skip to content

Commit

Permalink
Merge branch 'latest' into Bump-up-simorgh
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachael Njeri committed Aug 5, 2019
2 parents b3acbc8 + a8e1535 commit bdaa8f1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/app/contexts/RequestContext/getOriginContext/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,7 @@ const getOriginContext = bbcOrigin => {
if (bbcOrigin) {
origin = bbcOrigin;
} else if (process && process.env && process.env.APP_ENV === 'local') {
// For local dev, set origin to Test
// Ensures analytics are sent to Test bucket
origin = 'https://www.test.bbc.co.uk';
origin = process.env.SIMORGH_BASE_URL;
} else if (
typeof window !== 'undefined' &&
window.location &&
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,15 +57,16 @@ describe('getOriginContext - localhost', () => {

beforeEach(() => {
process.env.APP_ENV = 'local';
process.env.SIMORGH_BASE_URL = 'http://localhost.bbc.com:7080';
});

const localScenarios = [
{
description: 'should return test if local & undefined bbcOrigin',
bbcOrigin: undefined,
expected: {
isUK: true,
origin: 'https://www.test.bbc.co.uk',
isUK: false,
origin: 'http://localhost.bbc.com:7080',
},
},
{
Expand Down

0 comments on commit bdaa8f1

Please sign in to comment.