Produced by Araxis Merge on 10/4/2017 8:04:35 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\resources\permission-sets | activity-management-users-utility-spec.js | Mon Aug 21 12:51:00 2017 UTC |
| 2 | rdk.zip\rdk\product\production\rdk\src\resources\permission-sets | activity-management-users-utility-spec.js | Tue Oct 3 17:17:30 2017 UTC |
| Description | Between Files 1 and 2 |
|
|---|---|---|
| Text Blocks | Lines | |
| Unchanged | 3 | 242 |
| Changed | 2 | 4 |
| 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 _ = re quire('lod ash'); | |
| 4 | var oracle db = requi re('oracle db'); | |
| 5 | var httpMo cks = requ ire('node- mocks-http '); | |
| 6 | var activi tyManageme ntUsersUti l = requir e('./activ ity-manage ment-users -utility') ; | |
| 7 | var logger = sinon.s tub(requir e('bunyan' ).createLo gger({ | |
| 8 | name: 'activity- management -user-util ity' | |
| 9 | })); | |
| 10 | ||
| 11 | ||
| 12 | describe(' Activity M anagement Users Util ity', func tion() { | |
| 13 | var re q; | |
| 14 | var cb ; | |
| 15 | var mo ckPoolExec ; | |
| 16 | ||
| 17 | before Each(funct ion() { | |
| 18 | re q = httpMo cks.create Request({ | |
| 19 | method: 'PUT', | |
| 20 | url: 're source/per mission-se ts/edit' | |
| 21 | }) ; | |
| 22 | _. set(req, ' app.config .generalPu rposeJdsSe rver', { | |
| 23 | baseUrl: ' http:// IP ', | |
| 24 | urlLengt hLimit: 12 0 | |
| 25 | }) ; | |
| 26 | _. set(req, ' app.config .jbpm.ehmp routingDat abase', { | |
| 27 | user: 'n one', | |
| 28 | password : 'fake', | |
| 29 | connectStr ing: ' IP /XE' | |
| 30 | }) ; | |
| 31 | _. set(req, ' audit', {} ); | |
| 32 | _. set(req, ' logger', l ogger); | |
| 33 | _. set(req, ' session.us er', { | |
| 34 | uid: 'ur n:va:user: B14H:0007' , | |
| 35 | consumer Type: 'use r' | |
| 36 | }) ; | |
| 37 | _. set(req, ' query.user .uid', 'ur n:va:user: B14H:0001' ); | |
| 38 | cb = sinon.s py(); | |
| 39 | mo ckPoolExec = sinon.s tub(activi tyManageme ntUsersUti l._pool, ' doExecuteP rocWithInO utParams') ; | |
| 40 | }); | |
| 41 | ||
| 42 | afterE ach(functi on() { | |
| 43 | cb .reset(); | |
| 44 | mo ckPoolExec .reset(); | |
| 45 | }); | |
| 46 | ||
| 47 | descri be('does n ot error w hen a call is made f or', funct ion(){ | |
| 48 | it ('an oracl e insert o n an activ e user', f unction() { | |
| 49 | mockPool Exec.onCal l(0).calls ArgWith(5, null, {ro ws: 'conne ction.exec ute succes s'}); | |
| 50 | var para ms = { | |
| 51 | quer yParams: { | |
| 52 | 'i_user_ui d': 'urn:v a:user:B14 H:0001', | |
| 53 | 'output': { | |
| 54 | dir: o racledb.BI ND_OUT, | |
| 55 | type: oracledb.N UMBER | |
| 56 | } | |
| 57 | }, | |
| 58 | stat us: 'activ e', | |
| 59 | erro r: 'This s hould prop igate thro ugh the cr azy oracle db fake' | |
| 60 | }; | |
| 61 | activity Management UsersUtil( req, param s, cb); | |
| 62 | expect(c b.called). to.be.true (); | |
| 63 | expect(c b.firstCal l.args[0]) .to.be.fal sy(); | |
| 64 | expect(c b.firstCal l.args[1]) .to.be.tru thy(); | |
| 65 | }) ; | |
| 66 | ||
| 67 | it ('an oracl e delete o n an inact ive user', function( ) { | |
| 68 | mockPool Exec.onCal l(0).calls ArgWith(5, null, {ro ws: 'conne ction.exec ute succes s'}); | |
| 69 | var para ms = { | |
| 70 | quer yParams: { | |
| 71 | 'i_user_ui d': 'urn:v a:user:B14 H:0001', | |
| 72 | 'output': { | |
| 73 | dir: o racledb.BI ND_OUT, | |
| 74 | type: oracledb.N UMBER | |
| 75 | } | |
| 76 | }, | |
| 77 | stat us: 'inact ive' | |
| 78 | }; | |
| 79 | activity Management UsersUtil( req, param s, cb); | |
| 80 | expect(c b.called). to.be.true (); | |
| 81 | expect(c b.firstCal l.args[0]) .to.be.fal sy(); | |
| 82 | expect(c b.firstCal l.args[1]) .to.be.tru thy(); | |
| 83 | }) ; | |
| 84 | }); | |
| 85 | ||
| 86 | descri be('does l og an erro r when a c all errors during', function() { | |
| 87 | it ('an oracl e insert o n an activ e user', f unction() { | |
| 88 | mockPool Exec.onCal l(0).calls ArgWith(5, 'This is a bogus er ror.', nul l); | |
| 89 | var para ms = { | |
| 90 | quer yParams: { | |
| 91 | 'i_user_ui d': 'urn:v a:user:B14 H:0001', | |
| 92 | 'output': { | |
| 93 | dir: o racledb.BI ND_OUT, | |
| 94 | type: oracledb.N UMBER | |
| 95 | } | |
| 96 | }, | |
| 97 | stat us: 'activ e' | |
| 98 | }; | |
| 99 | activity Management UsersUtil( req, param s, cb); | |
| 100 | expect(c b.called). to.be.true (); | |
| 101 | expect(c b.firstCal l.args[0]) .to.be.tru thy(); | |
| 102 | expect(c b.firstCal l.args[1]) .to.be.fal sy(); | |
| 103 | }) ; | |
| 104 | ||
| 105 | it ('an oracl e delete o n an inact ive user', function( ) { | |
| 106 | mockPool Exec.onCal l(0).calls ArgWith(5, 'This is a bogus er ror.', nul l); | |
| 107 | var para ms = { | |
| 108 | quer yParams: { | |
| 109 | 'i_user_ui d': 'urn:v a:user:B14 H:0001', | |
| 110 | 'output': { | |
| 111 | dir: o racledb.BI ND_OUT, | |
| 112 | type: oracledb.N UMBER | |
| 113 | } | |
| 114 | }, | |
| 115 | stat us: 'inact ive' | |
| 116 | }; | |
| 117 | activity Management UsersUtil( req, param s, cb); | |
| 118 | expect(c b.called). to.be.true (); | |
| 119 | expect(c b.firstCal l.args[0]) .to.be.tru thy(); | |
| 120 | expect(c b.firstCal l.args[1]) .to.be.fal sy(); | |
| 121 | }) ; | |
| 122 | }); | |
| 123 | }); |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.