diff --git a/.insomnia/Request/req_61c232ba3e5145fdbdeaf76283bbdae8.yml b/.insomnia/Request/req_61c232ba3e5145fdbdeaf76283bbdae8.yml index de5a124..8bc08a8 100755 --- a/.insomnia/Request/req_61c232ba3e5145fdbdeaf76283bbdae8.yml +++ b/.insomnia/Request/req_61c232ba3e5145fdbdeaf76283bbdae8.yml @@ -1,7 +1,7 @@ _id: req_61c232ba3e5145fdbdeaf76283bbdae8 type: Request parentId: fld_0f6f8e8898c848a7b3e1a0455c1c6e51 -modified: 1651496182148 +modified: 1652889488055 created: 1651049731533 url: "{{base}}/Users" name: Users diff --git a/.insomnia/Request/req_ef7e9d77fc90488e8d005455c5f7ff28.yml b/.insomnia/Request/req_ef7e9d77fc90488e8d005455c5f7ff28.yml index b32fd46..965808c 100755 --- a/.insomnia/Request/req_ef7e9d77fc90488e8d005455c5f7ff28.yml +++ b/.insomnia/Request/req_ef7e9d77fc90488e8d005455c5f7ff28.yml @@ -1,7 +1,7 @@ _id: req_ef7e9d77fc90488e8d005455c5f7ff28 type: Request parentId: fld_0f6f8e8898c848a7b3e1a0455c1c6e51 -modified: 1651486313094 +modified: 1652889597805 created: 1651052824400 url: "{{base}}/Users/test" name: Users/:id diff --git a/.insomnia/UnitTest/ut_0336e3c86e494c658f26684b1cf3acff.yml b/.insomnia/UnitTest/ut_0336e3c86e494c658f26684b1cf3acff.yml deleted file mode 100755 index 7f36d5a..0000000 --- a/.insomnia/UnitTest/ut_0336e3c86e494c658f26684b1cf3acff.yml +++ /dev/null @@ -1,17 +0,0 @@ -_id: ut_0336e3c86e494c658f26684b1cf3acff -type: UnitTest -parentId: uts_429299a4eccb41d587546701419d1687 -modified: 1651483472086 -created: 1651143044064 -requestId: req_a94c79a2fd0a49b3b3c3d71966d96d5a -name: Get /User/test -code: > - const response = await insomnia.send(); - - const body = JSON.parse(response.data); - - expect(response.status).to.equal(200); - - expect(body.userName).to.equal('test'); - - expect(body.emails.find(x => x.primary === true).value).to.equal('test@example.net'); diff --git a/.insomnia/UnitTest/ut_3e40e630bb434b888548336d23039c5d.yml b/.insomnia/UnitTest/ut_3e40e630bb434b888548336d23039c5d.yml deleted file mode 100755 index 3816ee5..0000000 --- a/.insomnia/UnitTest/ut_3e40e630bb434b888548336d23039c5d.yml +++ /dev/null @@ -1,16 +0,0 @@ -_id: ut_3e40e630bb434b888548336d23039c5d -type: UnitTest -parentId: uts_429299a4eccb41d587546701419d1687 -modified: 1651483474016 -created: 1651143728650 -requestId: req_a94c79a2fd0a49b3b3c3d71966d96d5a -name: Get /User/test -code: > - const response1 = await insomnia.send(); - - const body = JSON.parse(response1.data); - - - expect(response1.status).to.equal(200); - - expect(body.emails.find(x => x.primary === true).value).to.equal('another@example.net'); diff --git a/.insomnia/UnitTest/ut_679fa5a9d3124222931e1436c64720af.yml b/.insomnia/UnitTest/ut_679fa5a9d3124222931e1436c64720af.yml index 6c88d10..2273efc 100755 --- a/.insomnia/UnitTest/ut_679fa5a9d3124222931e1436c64720af.yml +++ b/.insomnia/UnitTest/ut_679fa5a9d3124222931e1436c64720af.yml @@ -1,15 +1,14 @@ _id: ut_679fa5a9d3124222931e1436c64720af type: UnitTest parentId: uts_429299a4eccb41d587546701419d1687 -modified: 1651483466991 +modified: 1652889353104 created: 1651047628255 requestId: req_61c232ba3e5145fdbdeaf76283bbdae8 name: Get /Users -code: |+ +code: | const response = await insomnia.send(); expect(response.status).to.equal(200); const body = JSON.parse(response.data); //console.log(body); expect(body.Resources).to.be.an('array'); expect(body.Resources[0].id).to.equal('admin'); - diff --git a/.insomnia/UnitTest/ut_91894e79c9ed4d5da5f4e3db2bb7f4ba.yml b/.insomnia/UnitTest/ut_91894e79c9ed4d5da5f4e3db2bb7f4ba.yml deleted file mode 100755 index fafc927..0000000 --- a/.insomnia/UnitTest/ut_91894e79c9ed4d5da5f4e3db2bb7f4ba.yml +++ /dev/null @@ -1,10 +0,0 @@ -_id: ut_91894e79c9ed4d5da5f4e3db2bb7f4ba -type: UnitTest -parentId: uts_429299a4eccb41d587546701419d1687 -modified: 1651483473151 -created: 1651143719742 -requestId: req_ef7e9d77fc90488e8d005455c5f7ff28 -name: Put /User/test -code: |- - const response1 = await insomnia.send(); - expect(response1.status).to.equal(200); diff --git a/.insomnia/UnitTest/ut_bdcc8b3fadc246f0ad4d2ef37617d472.yml b/.insomnia/UnitTest/ut_bdcc8b3fadc246f0ad4d2ef37617d472.yml index 2bc371f..2b36bea 100755 --- a/.insomnia/UnitTest/ut_bdcc8b3fadc246f0ad4d2ef37617d472.yml +++ b/.insomnia/UnitTest/ut_bdcc8b3fadc246f0ad4d2ef37617d472.yml @@ -1,10 +1,51 @@ _id: ut_bdcc8b3fadc246f0ad4d2ef37617d472 type: UnitTest parentId: uts_429299a4eccb41d587546701419d1687 -modified: 1651483468325 +modified: 1652889638388 created: 1651142984584 requestId: req_a4fa84d8861d4122916524d3c67eb3d0 -name: Post /Users -code: |- - const response1 = await insomnia.send(); - expect(response1.status).to.equal(200); +name: Full scenario Post/Get/Put/Get/Del +code: >- + // Post /Users + + var response = await insomnia.send(); + + expect(response.status).to.equal(200); + + + // Get /User/test + + response = await insomnia.send('req_a94c79a2fd0a49b3b3c3d71966d96d5a'); + + var body = JSON.parse(response.data); + + expect(response.status).to.equal(200); + + expect(body.userName).to.equal('test'); + + expect(body.emails.find(x => x.primary === true).value).to.equal('test@example.net'); + + + // Put /User/test + + response = await insomnia.send('req_ef7e9d77fc90488e8d005455c5f7ff28'); + + expect(response.status).to.equal(200); + + + // Get /User/test + + response = await insomnia.send('req_a94c79a2fd0a49b3b3c3d71966d96d5a'); + + body = JSON.parse(response.data); + + expect(response.status).to.equal(200); + + expect(body.emails.find(x => x.primary === true).value).to.equal('another@example.net'); + + + // Del /User/test + + const response1 = await insomnia.send('req_e74f3da259354e84aa99967258d99bbb'); + + expect(response1.status).to.equal(204); diff --git a/.insomnia/UnitTest/ut_f8e860e92fbb403eb96e48889ec2c59a.yml b/.insomnia/UnitTest/ut_f8e860e92fbb403eb96e48889ec2c59a.yml deleted file mode 100755 index 6f8506a..0000000 --- a/.insomnia/UnitTest/ut_f8e860e92fbb403eb96e48889ec2c59a.yml +++ /dev/null @@ -1,10 +0,0 @@ -_id: ut_f8e860e92fbb403eb96e48889ec2c59a -type: UnitTest -parentId: uts_429299a4eccb41d587546701419d1687 -modified: 1651483475427 -created: 1651143759030 -requestId: req_e74f3da259354e84aa99967258d99bbb -name: Del /User/test -code: |- - const response1 = await insomnia.send(); - expect(response1.status).to.equal(204);