aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/main/java/com/juick/service/UserServiceImpl.java2
-rw-r--r--src/test/java/com/juick/server/tests/ServerTests.java6
2 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/com/juick/service/UserServiceImpl.java b/src/main/java/com/juick/service/UserServiceImpl.java
index 4d370631..93904139 100644
--- a/src/main/java/com/juick/service/UserServiceImpl.java
+++ b/src/main/java/com/juick/service/UserServiceImpl.java
@@ -66,7 +66,7 @@ public class UserServiceImpl extends BaseJdbcService implements UserService {
if (seen != null) {
user.setSeen(seen.toInstant());
}
- user.setVerified(rs.getInt(6) > 0);
+ user.setVerified(rs.getLong(6) > 0);
return user;
}
}
diff --git a/src/test/java/com/juick/server/tests/ServerTests.java b/src/test/java/com/juick/server/tests/ServerTests.java
index 1aaa578d..deef6f30 100644
--- a/src/test/java/com/juick/server/tests/ServerTests.java
+++ b/src/test/java/com/juick/server/tests/ServerTests.java
@@ -1852,4 +1852,10 @@ public class ServerTests {
List<Message> top = messagesService.getMessages(ugnich, messagesService.getPopular(ugnich.getUid(), 0));
assertThat(top.size(), is(1));
}
+ @Test
+ public void verifiedUsersTest(){
+ assertThat(userService.getUserByName("ugnich").isVerified(), is(false));
+ jdbcTemplate.update("INSERT INTO facebook(user_id, fb_id) VALUES(?, ?)", ugnich.getUid(), "100001866137681");
+ assertThat(userService.getUserByName("ugnich").isVerified(), is(true));
+ }
}