Skip to content
This repository has been archived by the owner on Jan 29, 2021. It is now read-only.

Commit

Permalink
fix test to expect exception
Browse files Browse the repository at this point in the history
  • Loading branch information
nilsbehlen committed Feb 27, 2020
1 parent 2bd02d5 commit 61789a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/src/test/java/it/netknights/piauthenticator/TestUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -215,15 +215,15 @@ public void removePublicKey() throws IOException {
assertFalse(test.exists());
}

@Test
@Test(expected = org.json.JSONException.class)
public void saveLoadDeleteFirebaseConfig() throws GeneralSecurityException, JSONException, IOException {
// there is none
assertNull(util.loadFirebaseConfig());

// This throws exception -> returns null
FirebaseInitConfig fbConf = new FirebaseInitConfig(null, null, null, null);
util.storeFirebaseConfig(fbConf);
assertNull(util.loadFirebaseConfig());
util.loadFirebaseConfig(); // this will throw an exception when evaluating the loaded JSON

// this should work
fbConf = new FirebaseInitConfig("projID", "appID", "api_key", "projNumber");
Expand Down

0 comments on commit 61789a2

Please sign in to comment.