Browse Source

Add test case for #130

Ben Hsieh 8 years ago
parent
commit
019e35f447
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      test/test-firebase.js

+ 5
- 1
test/test-firebase.js View File

@@ -41,7 +41,6 @@ var config = {
41 41
   storageBucket: "rnfb-test-app.appspot.com",
42 42
 };
43 43
 
44
-
45 44
 describe('firebase login', (report, done) => {
46 45
 
47 46
   firebase.initializeApp(config);
@@ -50,6 +49,11 @@ describe('firebase login', (report, done) => {
50 49
       console.log('firebase sigin failed', err)
51 50
     })
52 51
 
52
+  firebase.auth().createUserWithEmailAndPassword('xeiyan@gmail.com', 'rnfbtest1024')
53
+  .catch((err) => {
54
+    report(<Assert key="Should be 'auth/email-already-in-use'" expect={'auth/email-already-in-use'} actual={err.code}/>)
55
+  });
56
+
53 57
   firebase.auth().onAuthStateChanged((user) => {
54 58
     report(<Assert key="login status" uid="100"
55 59
       expect={true}