Commit bc791b809179dc14fe18c0d04d67b0bd9a2060f0

Authored by Adhidarma Hadiwinoto
1 parent 5144c93433
Exists in master

a little modification on test

Showing 1 changed file with 10 additions and 10 deletions Side-by-side Diff

... ... @@ -2,46 +2,46 @@ var assert = require("assert");
2 2  
3 3  
4 4 describe('aaa', function() {
5   - var aaa = require('./aaa');
6   -
  5 + var aaa = require('sate24/aaa');
  6 +
7 7 describe("#unaliasResponseCode()", function() {
8 8 it('should return 68', function() {
9 9 assert.equal('68', aaa.unaliasResponseCode('01', '01:68'));
10 10 });
11   -
  11 +
12 12 it('should return 68', function() {
13 13 assert.equal('68', aaa.unaliasResponseCode('68', '01:68'));
14 14 });
15   -
  15 +
16 16 it('should return 00', function() {
17 17 assert.equal('00', aaa.unaliasResponseCode('00', '01:68'));
18 18 });
19   -
  19 +
20 20 it('should return 40', function() {
21 21 assert.equal('40', aaa.unaliasResponseCode('40', ''));
22 22 });
23   -
  23 +
24 24 it('should return 40', function() {
25 25 assert.equal('40', aaa.unaliasResponseCode('40', ''));
26 26 });
27   -
  27 +
28 28 it('should return 40', function() {
29 29 assert.equal('40', aaa.unaliasResponseCode('40'));
30 30 });
31   -
  31 +
32 32 });
33 33 });
34 34  
35 35 describe('aaa', function() {
36 36 var partner = require('./httppulsakita');
37   -
  37 +
38 38 describe("#parseResult()", function() {
39 39 message = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><respon><tanggal>2015/6/16 15:43:35</tanggal><idagen>P0039</idagen><refid>AEE15B32987941D89FFF4BC7EF676C13</refid><produk>PLN20</produk><tujuan>14204279369</tujuan><rc>0000</rc><data> </data><token> </token><pesan>#14836 PLN20 ke:14204279369 SUKSES. SN:3520-2887-6627-6699-4826/TestDummyPanjang6955555/P1/7000VA/32,4. \
40 40 Sisa saldo Rp. 5,000,000 - Rp. 18,700 = Rp. 4,981,300</pesan></respon>';
41 41  
42 42 data = partner.parseResult(message);
43 43 console.log(data);
44   -
  44 +
45 45 it('should return 2015/6/16 15:43:35', function() {
46 46 assert.equal('2015/6/16 15:43:35', data.respon.tanggal);
47 47 });