Skip to content
This repository has been archived by the owner on Aug 17, 2023. It is now read-only.

Commit

Permalink
Add resolve spec for jenkins
Browse files Browse the repository at this point in the history
  • Loading branch information
holyshared committed Aug 23, 2015
1 parent a4060d4 commit 5b3e077
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions spec/environment/AdaptorResolver.spec.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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() {
Expand Down

0 comments on commit 5b3e077

Please sign in to comment.