dasch-swiss / beol

Bernoulli-Euler OnLine
https://beol.dasch.swiss
GNU Affero General Public License v3.0
0 stars 1 forks source link

unsubscribe from SearchParamsService #69

Closed tobiasschweizer closed 5 years ago

tobiasschweizer commented 5 years ago

When doing an extended search, a subscription to SearchParamsService is acquired in SearchResultsComponent.

When SearchResultsComponent is destroyed, the subscription has to be cancelled. Otherwise the old subscriptions are still active, causing unnecessary calls to the Knora API.

tobiasschweizer commented 5 years ago

Actually I want to add a test for this :-)

SepidehAlassi commented 5 years ago

@tobiasschweizer that is of course necessary to be on the safe side!

tobiasschweizer commented 5 years ago

We need more tests. I am trying to understand how to write them. It turns out to be non trivial since you have to mock what does not belong to your test.