Skip to content

Commit 3b5f78b

Browse files
committed
Add basic auth unit test
1 parent febd18b commit 3b5f78b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

azuredevops/azuredevops_test.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,3 +170,16 @@ func TestParseBasicAuth(t *testing.T) {
170170
assert.Nil(t, p)
171171
}
172172
}
173+
174+
func TestBasicAuth(t *testing.T) {
175+
const user = "user"
176+
const pass = "pass123"
177+
178+
opt := Options.BasicAuth(user, pass)
179+
h := &Webhook{}
180+
err := opt(h)
181+
182+
assert.NoError(t, err)
183+
assert.Equal(t, h.username, user)
184+
assert.Equal(t, h.password, pass)
185+
}

0 commit comments

Comments
 (0)