Skip to content
Prev Previous commit
Next Next commit
Added allusernamesfiltertest
  • Loading branch information
jean flores committed May 6, 2021
commit ad3a8ddbbb752be96bde828d28ef686af7a94a28
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
package com.dabsquared.gitlabjenkins.trigger.filter;

import org.apache.commons.lang.RandomStringUtils;
import org.junit.Test;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;

/**
* @author jean.flores
*/

public class AllUserNamesFilterTest{

@Test
public void isRandomBranchNameAllowed() {
String randomUserName = RandomStringUtils.random(10, true, false);
assertThat(new AllUserNamesFilter().isUserNameAllowed(randomUserName), is(true));
}
}