Skip to content

Commit

Permalink
EVEN BETTER TESTS NOW #176
Browse files Browse the repository at this point in the history
  • Loading branch information
Dahn Y committed Nov 18, 2018
1 parent aab4f7b commit c827e95
Showing 1 changed file with 14 additions and 0 deletions.
Expand Up @@ -68,6 +68,20 @@ public BufferedReader read(String name) {
Utility.openMenu();
}

@Test
public void doNotCrashWithFakeUrl() {
UrlReader reader = new UrlReader() {
@Override
public BufferedReader read(String name) {
return null;
}
};
// Change the factory
UrlReaderFactory.setDependency(reader);
MainFragment.newInstance(user);
Utility.openMenu();
}

@Test
public void refuseNonAdmin() {
nonAdminUser();
Expand Down

0 comments on commit c827e95

Please sign in to comment.