diff --git a/spec/environment/AdaptorResolver.spec.php b/spec/environment/AdaptorResolver.spec.php index 8d2fa65..fdb8a76 100644 --- a/spec/environment/AdaptorResolver.spec.php +++ b/spec/environment/AdaptorResolver.spec.php @@ -15,6 +15,7 @@ use coverallskit\environment\AdaptorResolver; use coverallskit\environment\CircleCI; use coverallskit\environment\DroneIO; +use coverallskit\environment\Jenkins; use coverallskit\environment\TravisCI; use coverallskit\environment\CodeShip; use coverallskit\environment\General; @@ -84,6 +85,19 @@ expect($adaptor)->toBeAnInstanceOf(CodeShip::class); }); }); + context('when jenkins', function() { + beforeEach(function() { + $environment = new Environment([ + 'BUILD_NUMBER' => '10', + 'JENKINS_URL' => 'http://example.com' + ]); + $this->resolver = new AdaptorResolver($environment); + }); + it('return detect jenkins adaptor', function() { + $adaptor = $this->resolver->resolveByEnvironment(); + expect($adaptor)->toBeAnInstanceOf(Jenkins::class); + }); + }); }); context('when not supported', function() { beforeEach(function() {