Permalink
Browse files

[JENKINS-30926] fixes blank problem in file name.

  • Loading branch information...
lordofthejars committed Oct 14, 2015
1 parent 7b1cdfb commit 76766cd22dd37255219a0016a6af87063bc6a379
Showing with 5 additions and 2 deletions.
  1. +5 −2 src/test/java/org/jenkinsci/plugins/plaincredentials/FileCredentialsTest.java
@@ -1,7 +1,7 @@
/*
* The MIT License
*
* Copyright 2013 jglick.
* Copyright 2015 asotobu.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@@ -28,6 +28,7 @@
import org.apache.commons.fileupload.FileItemHeaders;
import org.jenkinsci.plugins.plaincredentials.impl.FileCredentialsImpl;
import org.junit.Test;
import org.jvnet.hudson.test.Issue;

import java.io.File;
import java.io.IOException;
@@ -38,8 +39,10 @@
public class FileCredentialsTest {

@Test(expected = IllegalArgumentException.class)
@Issue("JENKINS-30926")
public void shouldThrowAnExceptionIfFileNameIsBlank() throws IOException {
FileCredentials fileCredentials = new FileCredentialsImpl(CredentialsScope.GLOBAL, "1", "", new StubFileItem(), "", "");
FileCredentials fileCredentials = new FileCredentialsImpl(CredentialsScope.GLOBAL, "1", "",
new StubFileItem(), "", "");
}

private class StubFileItem implements FileItem {

0 comments on commit 76766cd

Please sign in to comment.