CEC-2389 Add unit tests for SMS Context and SMS form (#247)

This commit is contained in:
arpanetus
2022-12-14 22:34:11 +06:00
committed by GitHub
parent 2ec340efc5
commit 7d27a0193f
9 changed files with 373 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
const smsAPI ={
send: async(data, token) => {
return {
smsMsgID:438222039,
status:"Pending",
messageText:"Test message",
senderLogin:"tfbenterpriseapiuser",
sentTo:"18707906682",
sentFrom: "Server",
msgType: "MT",
dateSent: "2021-08-17T15:00:00.000Z",
dateModified: "2021-08-17T15:00:00.000Z",
ICCID: "8988300000000000000",
}
}
}
export default smsAPI;

View File

@@ -6,10 +6,10 @@ const API_ENDPOINT = process.env.REACT_APP_OTA_SERVICE_URL;
const smsAPI = {
/**
* Sends a SMS to an ICCID
* @param {*} data
* @param {*} token
* @returns
* Sends an SMS to an ICCID
* @param {*} data
* @param {*} token
* @returns
*/
send: async (data, token) =>
fetch(`${API_ENDPOINT}/sms`, {