2024-05-23 07:25:35 +00:00
|
|
|
_type: export
|
|
|
|
__export_format: 4
|
|
|
|
__export_date: 2024-02-13T07:27:17.322Z
|
|
|
|
__export_source: insomnia.desktop.app:v8.6.1
|
|
|
|
resources:
|
|
|
|
- _id: wrk_6b9b8455fd784462ae19cd51d7156f86
|
|
|
|
parentId: null
|
|
|
|
modified: 1707808692801
|
|
|
|
created: 1707808692801
|
|
|
|
name: After-response Scripts
|
|
|
|
description: ""
|
|
|
|
scope: collection
|
|
|
|
_type: workspace
|
|
|
|
- _id: req_244fe815da6c4342a17f0cfd98cf648c
|
|
|
|
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
|
|
|
modified: 1707809218855
|
|
|
|
created: 1707808697304
|
|
|
|
url: http://127.0.0.1:4010/echo
|
|
|
|
name: tests with expect and test
|
|
|
|
description: ""
|
|
|
|
method: POST
|
|
|
|
afterResponseScript: |-
|
|
|
|
insomnia.test('happy tests', () => {
|
|
|
|
insomnia.expect(200).to.eql(200);
|
|
|
|
insomnia.expect('uname').to.be.a('string');
|
|
|
|
insomnia.expect('a').to.have.lengthOf(1);
|
|
|
|
insomnia.expect('xxx_customer_id_yyy').to.include("customer_id");
|
|
|
|
insomnia.expect(201).to.be.oneOf([201,202]);
|
|
|
|
insomnia.expect(199).to.be.below(200);
|
|
|
|
// test objects
|
|
|
|
insomnia.expect({a: 1, b: 2}).to.have.all.keys('a', 'b');
|
|
|
|
insomnia.expect({a: 1, b: 2}).to.have.any.keys('a', 'b');
|
|
|
|
insomnia.expect({a: 1, b: 2}).to.not.have.any.keys('c', 'd');
|
|
|
|
insomnia.expect({a: 1}).to.have.property('a');
|
|
|
|
insomnia.expect({a: 1, b: 2}).to.be.a('object')
|
|
|
|
.that.has.all.keys('a', 'b');
|
|
|
|
});
|
|
|
|
insomnia.test('unhappy tests', () => {
|
|
|
|
insomnia.expect(199).to.eql(200);
|
|
|
|
insomnia.expect(199).to.be.oneOf([201,202]);
|
|
|
|
});
|
|
|
|
body:
|
|
|
|
mimeType: "application/json"
|
|
|
|
text: |-
|
|
|
|
{}
|
|
|
|
parameters: []
|
|
|
|
headers:
|
|
|
|
- name: 'Content-Type'
|
|
|
|
value: 'application/json'
|
|
|
|
authentication: {}
|
|
|
|
metaSortKey: -1707809028499
|
|
|
|
isPrivate: false
|
|
|
|
pathParameters: []
|
|
|
|
settingStoreCookies: true
|
|
|
|
settingSendCookies: true
|
|
|
|
settingDisableRenderRequestBody: false
|
|
|
|
settingEncodeUrl: true
|
|
|
|
settingRebuildPath: true
|
|
|
|
settingFollowRedirects: global
|
|
|
|
_type: request
|
|
|
|
- _id: req_244fe815da6c4342a17f0cfd98cf6401
|
|
|
|
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
|
|
|
modified: 1707809218855
|
|
|
|
created: 1707808697304
|
|
|
|
url: http://127.0.0.1:4010/echo
|
|
|
|
name: persist environments
|
|
|
|
description: ""
|
|
|
|
method: POST
|
|
|
|
afterResponseScript: |-
|
|
|
|
insomnia.environment.set('__fromAfterScript', 'environment');
|
|
|
|
insomnia.baseEnvironment.set('__fromAfterScript1', 'baseEnvironment');
|
|
|
|
insomnia.collectionVariables.set('__fromAfterScript2', 'collection');
|
2024-05-30 08:20:08 +00:00
|
|
|
insomnia.environment.replaceIn('{{ $timestamp }}');
|
2024-05-23 07:25:35 +00:00
|
|
|
body:
|
|
|
|
mimeType: "application/json"
|
|
|
|
text: |-
|
|
|
|
{}
|
|
|
|
parameters: []
|
|
|
|
headers:
|
|
|
|
- name: 'Content-Type'
|
|
|
|
value: 'application/json'
|
|
|
|
authentication: {}
|
|
|
|
metaSortKey: -1707809028499
|
|
|
|
isPrivate: false
|
|
|
|
pathParameters: []
|
|
|
|
settingStoreCookies: true
|
|
|
|
settingSendCookies: true
|
|
|
|
settingDisableRenderRequestBody: false
|
|
|
|
settingEncodeUrl: true
|
|
|
|
settingRebuildPath: true
|
|
|
|
settingFollowRedirects: global
|
|
|
|
_type: request
|
|
|
|
- _id: env_f9ef1d097c5e00986051fcb4f7a921eea1a86916
|
|
|
|
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
|
|
|
modified: 1707808692805
|
|
|
|
created: 1707808692805
|
|
|
|
name: Base Environment
|
|
|
|
data: {}
|
|
|
|
dataPropertyOrder: null
|
|
|
|
color: null
|
|
|
|
isPrivate: false
|
|
|
|
metaSortKey: 1707808692805
|
|
|
|
_type: environment
|
|
|
|
- _id: jar_f9ef1d097c5e00986051fcb4f7a921eea1a86916
|
|
|
|
parentId: wrk_6b9b8455fd784462ae19cd51d7156f86
|
|
|
|
modified: 1707808692807
|
|
|
|
created: 1707808692807
|
|
|
|
name: Default Jar
|
|
|
|
cookies: []
|
|
|
|
_type: cookie_jar
|