From b4ecb5a14c160bfb3973c32d8a5915619e15ec52 Mon Sep 17 00:00:00 2001 From: Joseph Frazer Date: Thu, 16 Aug 2018 07:35:52 -0400 Subject: [PATCH] [DEV-3393] Made sure the entity id is a number --- src/quote/BaseQuote.js | 6 +++--- test/client/quote/ClientQuoteTest.js | 2 +- test/quote/BaseQuoteTest.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/quote/BaseQuote.js b/src/quote/BaseQuote.js index 6a6e6ba..05df67b 100644 --- a/src/quote/BaseQuote.js +++ b/src/quote/BaseQuote.js @@ -94,9 +94,9 @@ module.exports = Class( 'BaseQuote' ) /** * Id of agent entity that owns the quote - * @type {string} + * @type {number} */ - 'private _agentEntityId': '', + 'private _agentEntityId': 0, /** * Agency name @@ -305,7 +305,7 @@ module.exports = Class( 'BaseQuote' ) */ 'public setAgentEntityId': function( id ) { - this._agentEntityId = ( id ); + this._agentEntityId = +id; return this; }, diff --git a/test/client/quote/ClientQuoteTest.js b/test/client/quote/ClientQuoteTest.js index cb3ad46..3ad9260 100644 --- a/test/client/quote/ClientQuoteTest.js +++ b/test/client/quote/ClientQuoteTest.js @@ -33,7 +33,7 @@ describe( 'ClientQuote', () => const start_date = 12345; const agent_id = 90000; const agent_name = 'John Doe'; - const agent_entity_id = '12434300'; + const agent_entity_id = 12434300; const initial_rated_date = 1531507748; const quote = ClientQuote( base_quote, diff --git a/test/quote/BaseQuoteTest.js b/test/quote/BaseQuoteTest.js index 401e3d9..9c6b8cd 100644 --- a/test/quote/BaseQuoteTest.js +++ b/test/quote/BaseQuoteTest.js @@ -38,7 +38,7 @@ describe( 'BaseQuote', () => }, { property: 'agentEntityId', - value: 'AGT5432' + value: 12434300 }, ].forEach( testCase => {