Skip to content

Commit dba178b

Browse files
itscarom1guelpf
authored andcommitted
Update JobsTest.php
1 parent b3b06bd commit dba178b

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

test/Gitlab/Tests/Api/JobsTest.php

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,23 @@ public function shouldGetArtifactsByRefName()
101101

102102
$this->assertEquals('foobar', $api->artifactsByRefName(1, 'master', 'job_name')->getContents());
103103
}
104+
105+
/**
106+
* @test
107+
*/
108+
public function shouldGetArtifactByRefName()
109+
{
110+
$returnedStream = new Response(200, [], 'foobar');
111+
$api = $this->getApiMock();
112+
$api->expects($this->once())
113+
->method('getAsResponse')
114+
->with('projects/1/jobs/artifacts/master/raw/artifact_path', array(
115+
'job' => 'job_name'
116+
))
117+
->will($this->returnValue($returnedStream))
118+
;
119+
$this->assertEquals('foobar', $api->artifactByRefName(1, 'master', 'job_name', 'artifact_path')->getContents());
120+
}
104121

105122
/**
106123
* @test

0 commit comments

Comments
 (0)