Merge branch 'tests' into 'dev'

Four letters can change the behaviour of a piece of code a lot

See merge request sa4-2020/the-sanmarinoes/backend!207
This commit is contained in:
Claudio Maggioni 2020-05-27 22:07:16 +02:00
commit f646ce38a5
2 changed files with 2 additions and 4 deletions

View file

@ -148,7 +148,7 @@ public class DevicePropagationService {
} }
if (causedByTrigger) { if (causedByTrigger) {
endpoint.queueDeviceUpdate(device, user, false, user.getId(), false); endpoint.queueDeviceUpdate(device, user, false, null, false);
} }
} }
} }

View file

@ -210,9 +210,7 @@ public class DevicePropagationServiceTests {
doAnswer(i -> counter[0]++) doAnswer(i -> counter[0]++)
.when(endpoint) .when(endpoint)
.queueDeviceUpdate(d, guest, false, host.getId(), false); .queueDeviceUpdate(d, guest, false, host.getId(), false);
doAnswer(i -> counter[0]++) doAnswer(i -> counter[0]++).when(endpoint).queueDeviceUpdate(d, host, false, null, false);
.when(endpoint)
.queueDeviceUpdate(d, host, false, host.getId(), false);
devicePropagationService.propagateUpdateAsOwner(d, "host", false); devicePropagationService.propagateUpdateAsOwner(d, "host", false);
assertThat(counter[0]).isEqualTo(1); assertThat(counter[0]).isEqualTo(1);