diff options
author | Finrod Felagund <finrod.felagund.97@gmail.com> | 2024-06-03 17:43:06 +0200 |
---|---|---|
committer | Finrod Felagund <finrod.felagund.97@gmail.com> | 2024-06-04 09:38:50 +0200 |
commit | 43b61ff06e18a79a3e16e38445e92b0ad678bd9f (patch) | |
tree | a8341eef8b63d45eed8060ae5569727516403f8a /test/nostr_service_test.cpp | |
parent | 0f4494bf6b292ad7883219cd6628689e7ddb9438 (diff) |
remove trailing whitespace and unimplemented closeSubscriptions() function
Diffstat (limited to 'test/nostr_service_test.cpp')
-rw-r--r-- | test/nostr_service_test.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/test/nostr_service_test.cpp b/test/nostr_service_test.cpp index b3b9b28..5867e8e 100644 --- a/test/nostr_service_test.cpp +++ b/test/nostr_service_test.cpp @@ -29,7 +29,7 @@ public: MOCK_METHOD(void, closeConnection, (string uri), (override)); }; -class FakeSigner : public nostr::ISigner +class FakeSigner : public nostr::ISigner { public: void sign(shared_ptr<nostr::Event> event) override @@ -71,7 +71,7 @@ public: nostr::Event event1; event1.pubkey = "13tn5ccv2guflxgffq4aj0hw5x39pz70zcdrfd6vym887gry38zys28dask"; event1.kind = 1; - event1.tags = + event1.tags = { { "e", "5c83da77af1dec6d7289834998ad7aafbd9e2191396d75ec3cc27f5a77226f36", "wss://nostr.example.com" }, { "p", "f7234bd4c1394dda46d09f35bd384dd30cc552ad5541990f98844fb06676e9ca" }, @@ -91,7 +91,7 @@ public: }; event2.content = "Welcome to Nostr!"; event2.createdAt = currentTime; - + nostr::Event event3; event3.pubkey = "187ujhtmnv82ftg03h4heetwk3dd9mlfkf8th3fvmrk20nxk9mansuzuyla"; event3.kind = 1; @@ -124,7 +124,7 @@ public: } static const string getTestEventMessage(shared_ptr<nostr::Event> event, string subscriptionId) - { + { auto signer = make_unique<FakeSigner>(); signer->sign(event); @@ -140,7 +140,7 @@ public: { nostr::Filters filters; filters.authors = { - "13tn5ccv2guflxgffq4aj0hw5x39pz70zcdrfd6vym887gry38zys28dask", + "13tn5ccv2guflxgffq4aj0hw5x39pz70zcdrfd6vym887gry38zys28dask", "1l9d9jh67rkwayalrxcy686aujyz5pper5kzjv8jvg8pu9v9ns4ls0xvq42", "187ujhtmnv82ftg03h4heetwk3dd9mlfkf8th3fvmrk20nxk9mansuzuyla" }; @@ -154,7 +154,7 @@ public: { nostr::Filters filters; filters.authors = { - "13tn5ccv2guflxgffq4aj0hw5x39pz70zcdrfd6vym887gry38zys28dask", + "13tn5ccv2guflxgffq4aj0hw5x39pz70zcdrfd6vym887gry38zys28dask", "1l9d9jh67rkwayalrxcy686aujyz5pper5kzjv8jvg8pu9v9ns4ls0xvq42", "187ujhtmnv82ftg03h4heetwk3dd9mlfkf8th3fvmrk20nxk9mansuzuyla" }; @@ -240,7 +240,7 @@ TEST_F(NostrServiceTest, OpenRelayConnections_OpensConnections_ToDefaultRelays) } return status; })); - + auto nostrService = make_unique<nostr::NostrService>( testAppender, mockClient, @@ -468,7 +468,7 @@ TEST_F(NostrServiceTest, PublishEvent_CorrectlyIndicates_AllSuccesses) return make_tuple(uri, true); })); - + auto testEvent = make_shared<nostr::Event>(getTextNoteTestEvent()); auto [successes, failures] = nostrService->publishEvent(testEvent); @@ -514,7 +514,7 @@ TEST_F(NostrServiceTest, PublishEvent_CorrectlyIndicates_AllFailures) { return make_tuple(uri, false); })); - + auto testEvent = make_shared<nostr::Event>(getTextNoteTestEvent()); auto [successes, failures] = nostrService->publishEvent(testEvent); @@ -573,7 +573,7 @@ TEST_F(NostrServiceTest, PublishEvent_CorrectlyIndicates_MixedSuccessesAndFailur return make_tuple(uri, true); })); - + auto testEvent = make_shared<nostr::Event>(getTextNoteTestEvent()); auto [successes, failures] = nostrService->publishEvent(testEvent); @@ -623,7 +623,7 @@ TEST_F(NostrServiceTest, PublishEvent_CorrectlyIndicates_RejectedEvent) return make_tuple(uri, true); })); - + auto testEvent = make_shared<nostr::Event>(getTextNoteTestEvent()); auto [successes, failures] = nostrService->publishEvent(testEvent); @@ -686,7 +686,7 @@ TEST_F(NostrServiceTest, PublishEvent_CorrectlyIndicates_EventRejectedBySomeRela return make_tuple(uri, true); })); - + auto testEvent = make_shared<nostr::Event>(getTextNoteTestEvent()); auto [successes, failures] = nostrService->publishEvent(testEvent); @@ -890,7 +890,7 @@ TEST_F(NostrServiceTest, QueryRelays_CallsHandler_WithReturnedEvents) } }, [](const string&, const string&) {}); - + eoseReceivedFuture.wait(); // Check that the service is keeping track of its active subscriptions. @@ -1055,7 +1055,7 @@ TEST_F(NostrServiceTest, Service_MaintainsMultipleSubscriptions_ThenClosesAll) longFormPromise.set_value(); }, [](const string&, const string&) {}); - + shortFormFuture.wait(); longFormFuture.wait(); |