Skip to content

Commit 2461cdd

Browse files
committed
update tests
1 parent 66f9c02 commit 2461cdd

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

test/tests.jl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,21 @@ end
146146
else
147147
# On Julia <1.4, the return value of `PkgAuthentication.install` will be
148148
# the return value from the `PkgAuthentication.authenticate` call.
149-
@test result.f isa PkgAuthentication.Success
149+
@test isnothing(result.f)
150+
end
151+
152+
@testset "PkgAuthentication.Uninstall" begin
153+
let u = PkgAuthentication.Uninstall(nothing)
154+
@test u() === nothing
155+
end
156+
let count = 1
157+
u = PkgAuthentication.Uninstall(() -> (count += 1; nothing))
158+
@test count == 1
159+
@test u() === nothing
160+
@test count == 2
161+
@test u() === nothing
162+
@test count == 3
163+
end
150164
end
151165
end
152166

0 commit comments

Comments
 (0)