#792 Add missing tests / fix CodeClimate issues

This commit is contained in:
ljacqu
2017-10-20 17:49:30 +02:00
parent 90073ef95d
commit a425eacf2d
7 changed files with 165 additions and 33 deletions
@@ -113,7 +113,7 @@ public class SessionServiceTest {
}
@Test
public void shouldRefuseSessionForAuthWithZeroLastLoginTimestamp() {
public void shouldRefuseSessionForAuthWithNullLastLoginTimestamp() {
// given
String name = "Bobby";
String ip = "127.3.12.15";
@@ -122,7 +122,7 @@ public class SessionServiceTest {
given(dataSource.hasSession(name)).willReturn(true);
PlayerAuth auth = PlayerAuth.builder()
.name(name)
.lastLogin(0L)
.lastLogin(null)
.lastIp(ip).build();
given(dataSource.getAuth(name)).willReturn(auth);