diff --git a/.travis.yml b/.travis.yml
index f009b12..81062d9 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -10,7 +10,7 @@ services:
   - mongodb
 
 before_script:
-  - mongo test_db --eval 'db.addUser("travis", "test");'
+  - mongo test_db --eval 'db.createUser({user:"travis",pwd:"test",roles:["readWrite"]});'
 
 before_deploy:
   - npm run release