Produced by Araxis Merge on 10/3/2017 11:16:01 AM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
| # | Location | File | Last Modified |
|---|---|---|---|
| 1 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\handlers\osync\admissions | admissions-itest-spec.js | Mon Jul 10 17:46:22 2017 UTC |
| 2 | ehmp.zip\ehmp\ehmp\product\production\vx-sync\tests\integrationtests\handlers\osync\admissions | admissions-itest-spec.js | Tue Oct 3 12:50:26 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 178 |
| Changed | 2 | 16 |
| Inserted | 0 | 0 |
| Removed | 0 | 0 |
| Whitespace | |
|---|---|
| Character case | Differences in character case are significant |
| Line endings | Differences in line endings (CR and LF characters) are ignored |
| CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
| 1 | 'use stric t'; | |
| 2 | /* global describe, it, before Each, spyO n, expect, runs, wai tsFor */ | |
| 3 | ||
| 4 | require('. ./../../.. /../env-se tup'); | |
| 5 | var _ = re quire('und erscore'); | |
| 6 | var logger = require (global.VX _DUMMIES + 'dummy-lo gger'); | |
| 7 | ||
| 8 | // logger = require( 'bunyan'). createLogg er({ | |
| 9 | // nam e: 'osync- admissions ', | |
| 10 | // lev el: 'debug ' | |
| 11 | // }); | |
| 12 | ||
| 13 | var handle r = requir e(global.V X_HANDLERS + 'osync/ admissions /admission s'); | |
| 14 | ||
| 15 | var Router = require (global.VX _DUMMIES + 'publishe rRouterDum my'); | |
| 16 | var Publis her = requ ire(global .VX_DUMMIE S + 'publi sherDummy' ); | |
| 17 | var Update r = requir e(global.V X_DUMMIES + 'JobStat usUpdaterD ummy'); | |
| 18 | var VistaC lientDummy = require (global.VX _DUMMIES + 'vista-cl ient-dummy '); | |
| 19 | ||
| 20 | var wConfi g = requir e(global.V X_ROOT + ' worker-con fig'); | |
| 21 | ||
| 22 | var mockCo nfig = { | |
| 23 | delay: 5, | |
| 24 | rpcCon text: 'HMP SYNCHRONI ZATION CON TEXT', | |
| 25 | vistaS ites: _.de faults(wCo nfig.vista Sites, { | |
| 26 | '9 E7A': { | |
| 27 | 'name': 'panorama' , | |
| 28 | 'host': ' IP ', | |
| 29 | 'port': PORT , | |
| 30 | 'accessCod e': ' REDACTED ', | |
| 31 | 'verifyCod e': ' REDACTED ', | |
| 32 | 'localIP ': '127.0. 0.1', | |
| 33 | 'station Number': 5 00, | |
| 34 | 'localAd dress': 'l ocalhost', | |
| 35 | 'connect Timeout': 3000, | |
| 36 | 'sendTim eout': 200 00 | |
| 37 | }, | |
| 38 | 'C 877': { | |
| 39 | 'name': 'kodak', | |
| 40 | 'host': ' IP ', | |
| 41 | 'port': PORT , | |
| 42 | 'accessCod e': ' REDACTED ', | |
| 43 | 'verifyCod e': ' REDACTED ', | |
| 44 | 'localIP ': '127.0. 0.1', | |
| 45 | 'station Number': 5 00, | |
| 46 | 'localAd dress': 'l ocalhost', | |
| 47 | 'connect Timeout': 3000, | |
| 48 | 'sendTim eout': 200 00 | |
| 49 | } | |
| 50 | }) | |
| 51 | }; | |
| 52 | ||
| 53 | var mockHa ndlerCallb ack = { | |
| 54 | callba ck: functi on (error, response) { | |
| 55 | } | |
| 56 | }; | |
| 57 | ||
| 58 | describe(' osync-admi ssions-han dler.js', function ( ) { | |
| 59 | before Each(funct ion () { | |
| 60 | sp yOn(mockHa ndlerCallb ack, 'call back'); | |
| 61 | }); | |
| 62 | ||
| 63 | it('sh ould call without er ror', func tion () { | |
| 64 | va r done = f alse; | |
| 65 | va r testData = null; | |
| 66 | va r testErro r = null; | |
| 67 | ||
| 68 | ru ns(functio n () { | |
| 69 | var job = {}; | |
| 70 | job.type = 'admiss ions'; | |
| 71 | job.site Id = 'C877 '; | |
| 72 | ||
| 73 | var mock Publisher = new Publ isher(logg er, mockCo nfig, job. type); | |
| 74 | var envi ronment = { | |
| 75 | vist aClient: n ew VistaCl ientDummy( logger, mo ckConfig, null), | |
| 76 | publ isherRoute r: new Rou ter(logger , mockConf ig, Update r, mockPub lisher) | |
| 77 | }; | |
| 78 | ||
| 79 | handler( logger, mo ckConfig, environmen t, job, fu nction (er ror, data) { | |
| 80 | done = true; | |
| 81 | test Data = dat a; | |
| 82 | test Error = er ror; | |
| 83 | mock HandlerCal lback.call back(); | |
| 84 | }); | |
| 85 | }) ; | |
| 86 | ||
| 87 | wa itsFor(fun ction () { | |
| 88 | return d one; | |
| 89 | }, 'Callback not calle d', 50000) ; | |
| 90 | ||
| 91 | ru ns(functio n () { | |
| 92 | expect(m ockHandler Callback.c allback).t oHaveBeenC alled(); | |
| 93 | ||
| 94 | expect(t estError). toBeFalsy( ); | |
| 95 | }) ; | |
| 96 | }); | |
| 97 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.