UNPKG

mares-apistore-message-sender

Version:

apistore용 rest api를 wrapping한 node.js용 모듈입니다.

30 lines (25 loc) 920 B
const should = require('should'); const utils = require('./utils'); const ApistoreMessageSender = require('./index'); const _ = require('lodash'); suite('Module ApistoreMessageSender Test', () => { suiteSetup(async () => { this.token = ''; this.sender = new ApistoreMessageSender(this.token); }); suite('send method test', async () => { test('should fail to send message.', async () => { try { await utils.send('123123', '01011111111', '01011111111', 'title', ''); } catch (e) { e.statusCode.should.eql(403); } }); }); suite('sendMessage method test', async () => { test('should fail to send message.', async () => { let result = await this.sender.sendMessage('01011111111', '01011111111', 'title', null); result.should.instanceOf(String); }); }); });