Fix the incorrect approvable check of Pipeline input
Signed-off-by: rick <rick@jenkins-zh.cn>
This commit is contained in:
@@ -19,8 +19,8 @@ func TestGetSubmitters(t *testing.T) {
|
||||
func TestApprovable(t *testing.T) {
|
||||
input := &Input{}
|
||||
|
||||
assert.Equal(t, input.Approvable(""), true, "should allow anyone to approve it if there's no submitter given")
|
||||
assert.Equal(t, input.Approvable("fake"), true, "should allow anyone to approve it if there's no submitter given")
|
||||
assert.Equal(t, input.Approvable(""), false, "should allow anyone to approve it if there's no submitter given")
|
||||
assert.Equal(t, input.Approvable("fake"), false, "should allow anyone to approve it if there's no submitter given")
|
||||
|
||||
input.Submitter = "fake"
|
||||
assert.Equal(t, input.Approvable(""), false, "should not approve by nobody if there's a particular submitter")
|
||||
|
||||
Reference in New Issue
Block a user