Commit 951f79b5 authored by Killian LUCAS's avatar Killian LUCAS
Browse files

DataStoreTest

parent 1f6e6b94
......@@ -19,21 +19,21 @@ public class DataStoreTest {
@Autowired
private TestEntityManager entityManager;
@Autowired
UserRepository repository;
UserRepository userRepository;
@Test
public void no_User(){
Iterable<User> customers = repository.findAll();
Assertions.assertThat(customers).isEmpty();
Iterable<User> users = userRepository.findAll();
Assertions.assertThat(users).isEmpty();
}
@Test
public void should_store(){
User u = new User("ok","Jetecarryenadc","ok");
User user = repository.save(new User("JackyLove@world.net", "Jetecarryenadc","JackyLove"));
public void testUserRepository__store(){
User user = userRepository.save(new User("JackyLove@world.net", "Jetecarryenadc","JackyLove"));
Assertions.assertThat(user).hasFieldOrPropertyWithValue("mail","JackyLove@world.net");
// assertThat(user).hasFieldOrPropertyWithValue("password",u.getPasswordHash());
// assertThat(user).hasFieldOrPropertyWithValue("password",u.getPasswordHash());
Assertions.assertThat(user).hasFieldOrPropertyWithValue("pseudo","JackyLove");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment