Skip to content

Commit

Permalink
#315: add empty file case to o:inputFile IT
Browse files Browse the repository at this point in the history
  • Loading branch information
Bauke Scholtz committed Sep 24, 2016
1 parent 1033017 commit c893612
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,12 @@ public void uploadSingle() throws IOException {
assertEquals("uploadSingle: " + txtFile.length() + ", " + txtFile.getName(), messages.getText());
}

@Test
public void uploadSingleEmpty() throws IOException {
guardHttp(uploadSingleSubmit).click();
assertEquals("uploadSingle: null", messages.getText());
}

@Test
public void uploadSingleAjax() throws IOException {
File txtFile = createTempFile("file", "txt", "hello world");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class InputFileITBean {
private List<Part> files;

public void uploadSingle() {
addGlobalInfo("uploadSingle: " + file.getSize() + ", " + getSubmittedFileName(file));
addGlobalInfo("uploadSingle: " + (file == null ? "null" : (file.getSize() + ", " + getSubmittedFileName(file))));
}

public void uploadMultiple() {
Expand Down

0 comments on commit c893612

Please sign in to comment.