Produced by Araxis Merge on 10/4/2017 8:04:37 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 | rdk.zip\rdk\product\production\rdk\src\write\orders | sign-orders-resource-spec.js | Mon Aug 21 12:51:00 2017 UTC |
| 2 | rdk.zip\rdk\product\production\rdk\src\write\orders | sign-orders-resource-spec.js | Tue Oct 3 19:07:19 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 12 | 204 |
| Changed | 11 | 32 |
| 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 | ||
| 3 | var httpMo cks = requ ire('node- mocks-http '); | |
| 4 | var writeb ackorder_s ignnote = require('. /sign-orde rs-resourc e'); | |
| 5 | var RpcCli ent = requ ire('vista -js').RpcC lient; | |
| 6 | ||
| 7 | var mock_s ession = { | |
| 8 | user: { | |
| 9 | username: ' R E D A CTED ; DNS ', | |
| 10 | password: ' DNS !!', | |
| 11 | du z: { | |
| 12 | ' R E D A CTED ': '100000 00257' | |
| 13 | }, | |
| 14 | site: ' R E D A CTED ' | |
| 15 | } | |
| 16 | }; | |
| 17 | ||
| 18 | describe(' writebacko rder_signO rder:', fu nction() { | |
| 19 | descri be('functi on signOrd er', funct ion() { | |
| 20 | va r req = {} ; | |
| 21 | va r res, moc kCallRpc; | |
| 22 | ||
| 23 | be foreEach(f unction() { | |
| 24 | req = {} ; | |
| 25 | res = ht tpMocks.cr eateRespon se(); | |
| 26 | ||
| 27 | mockCall Rpc = sino n.stub(Rpc Client, 'c allRpc', f unction(lo gger, rpcC onfig, rpc , args, ca llback) { | |
| 28 | retu rn callbac k(null, 'd ata'); | |
| 29 | }); | |
| 30 | }) ; | |
| 31 | ||
| 32 | af terEach(fu nction() { | |
| 33 | mockCall Rpc.restor e(); | |
| 34 | }) ; | |
| 35 | ||
| 36 | it ('should c all Vista RPCs', fun ction(done ) { | |
| 37 | var req = { | |
| 38 | para m: functio n(param) { | |
| 39 | return par am; | |
| 40 | }, | |
| 41 | inte rceptorRes ults: { | |
| 42 | patientIde ntifiers: { | |
| 43 | site: ' R E D A CTED ' | |
| 44 | } | |
| 45 | }, | |
| 46 | body : { | |
| 47 | param: { | |
| 48 | signat ureCode: ' $+9-7i/ll ', | |
| 49 | orders : { | |
| 50 | 38 741: '' | |
| 51 | }, | |
| 52 | locati onIEN: 23, | |
| 53 | patien tIEN: 8 | |
| 54 | }, | |
| 55 | pid: ' R E D A CTED ;8' | |
| 56 | }, | |
| 57 | logg er: sinon. stub(requi re('bunyan ').createL ogger({nam e: 'sign-o rder'})), | |
| 58 | app: { | |
| 59 | config: { | |
| 60 | rpcCon fig: { | |
| 61 | co ntext: 'HM P UI CONTE XT', | |
| 62 | siteHash: ' R E D A CTED ' | |
| 63 | }, | |
| 64 | vistaS ites: { | |
| 65 | ' R E D A CTED ': { | |
| 66 | name: 'P ANORAMA', | |
| 67 | division : '500', | |
| 68 | host: ' IP ', | |
| 69 | port: PORT , | |
| 70 | producti on: false, | |
| 71 | accessCode : ' DNS ', | |
| 72 | verifyCode : ' DNS !!' | |
| 73 | }, | |
| 74 | 'C 877': { | |
| 75 | name: 'K ODAK', | |
| 76 | division : '500', | |
| 77 | host: ' IP ', | |
| 78 | port: PORT , | |
| 79 | producti on: false, | |
| 80 | accessCode : ' DNS ', | |
| 81 | verifyCode : ' DNS !!' | |
| 82 | } | |
| 83 | } | |
| 84 | } | |
| 85 | }, | |
| 86 | sess ion: mock_ session | |
| 87 | }; | |
| 88 | ||
| 89 | function tester(re sponse) { | |
| 90 | expe ct(mockCal lRpc.calle d).to.be.t rue(); | |
| 91 | ||
| 92 | done (); | |
| 93 | } | |
| 94 | res.rdkS end = test er; | |
| 95 | ||
| 96 | writebac korder_sig nnote._sig nOrder(req , res); | |
| 97 | ||
| 98 | // }); | |
| 99 | // it('s hould veri fy the use r is a Pro vider with : "TIU WHI CH SIGNATU RE ACTION" ', functio n() { | |
| 100 | // w ritebackno te_signnot e._signNot e(req, res ); | |
| 101 | // expec t(RpcClien t.callRpc. calledWith (sinon.mat ch.any, si non.match. any, sinon .match('TI U WHICH SI GNATURE AC TION'))).t o.be.true( ); | |
| 102 | // }); | |
| 103 | // it('s hould veri fy the use r is autho rized with : "TIU AUT HORIZATION "', functi on() { | |
| 104 | // w ritebackno te_signnot e._signNot e(req, res ); | |
| 105 | // expec t(RpcClien t.callRpc. calledWith (sinon.mat ch.any, si non.match. any, sinon .match('TI U AUTHORIZ ATION'))). to.be.true (); | |
| 106 | // }); | |
| 107 | // it('s hould lock the note with: "TIU LOCK RECO RD"', func tion() { | |
| 108 | // w ritebackno te_signnot e._signNot e(req, res ); | |
| 109 | // expec t(RpcClien t.callRpc. calledWith (sinon.mat ch.any, si non.match. any, sinon .match('TI U LOCK REC ORD'))).to .be.true() ; | |
| 110 | // }); | |
| 111 | // it('s hould veri fy the sig natureCode with: "OR WU VALIDSI G"', funct ion() { | |
| 112 | // w ritebackno te_signnot e._signNot e(req, res ); | |
| 113 | // expec t(RpcClien t.callRpc. calledWith (sinon.mat ch.any, si non.match. any, sinon .match('OR WU VALIDSI G'))).to.b e.true(); | |
| 114 | }) ; | |
| 115 | ||
| 116 | }); | |
| 117 | ||
| 118 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.