mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-15 04:52:20 +00:00
[JENKINS-52181] - Create Unit test for the new behavior
This commit is contained in:
1 parent
af5fdc99fe
commit
a3576afd23
1 file changed
+11
@@ -80,6 +80,17 @@ public class ConsoleCommandTest {
|
||||
assertThat(result, hasNoStandardOutput());
|
||||
assertThat(result.stderr(), containsString("ERROR: No such job 'aProject'"));
|
||||
}
|
||||
|
||||
@Issue("JENKINS-52181")
|
||||
@Test public void consoleShouldBeAccessibleForUserWithRead() throws Exception {
|
||||
j.createFreeStyleProject("aProject");
|
||||
final CLICommandInvoker.Result result = command
|
||||
.authorizedTo(Jenkins.READ, Job.READ)
|
||||
.invokeWithArgs("aProject");
|
||||
|
||||
assertThat(result, succeeded());
|
||||
assertThat(result.stdout(), containsString("echo 5"));
|
||||
}
|
||||
|
||||
@Test public void consoleShouldFailWhenProjectDoesNotExist() throws Exception {
|
||||
|
||||
|
||||
Reference in new issue
Block a user