From 40b681ad6e4305fa586f63c0312f0603fa789791 Mon Sep 17 00:00:00 2001
From: Benoit Lavenier <benoit.lavenier@e-is.pro>
Date: Mon, 15 May 2023 15:55:28 +0200
Subject: [PATCH] Add a unit test to check invalid request
 /wot/requirements/:search?pubkey=true

---
 test/integration/identity/identity-test.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/test/integration/identity/identity-test.ts b/test/integration/identity/identity-test.ts
index d87331eff..708ba15f2 100644
--- a/test/integration/identity/identity-test.ts
+++ b/test/integration/identity/identity-test.ts
@@ -327,6 +327,10 @@ describe("Identities collision", function() {
     });
   });
 
+  it('requirements by invalid pubkey', function() {
+    return expectError(404, "No identity matching this pubkey or uid", rp('http://127.0.0.1:7799/wot/requirements/cat?pubkey=true', { json: true }));
+  });
+
   it('should have certified-by/tic giving results', function() {
     return expectAnswer(rp('http://127.0.0.1:7799/wot/certified-by/tic', { json: true }), function(res:HttpCertifications) {
       res.should.have.property('pubkey').equal('DNann1Lh55eZMEDXeYt59bzHbA3NJR46DeQYCS2qQdLV');
-- 
GitLab