Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/Github/Api/GitData/Blobs.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ public function show($username, $repository, $sha)
*/
public function create($username, $repository, array $params)
{
if (!isset($params['content'], $params['encoding'])) {
throw new MissingArgumentException(['content', 'encoding']);
if (!isset($params['content'])) {
throw new MissingArgumentException('content');
}

return $this->post('/repos/'.rawurlencode($username).'/'.rawurlencode($repository).'/git/blobs', $params);
Expand Down
15 changes: 0 additions & 15 deletions test/Github/Tests/Api/GitData/BlobsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,21 +68,6 @@ public function shouldCreateBlob()
$this->assertEquals($expectedValue, $api->create('l3l0', 'l3l0repo', $data));
}

/**
* @test
*/
public function shouldNotCreateBlobWithoutEncoding()
{
$this->expectException(MissingArgumentException::class);
$data = ['content' => 'some cotent'];

$api = $this->getApiMock();
$api->expects($this->never())
->method('post');

$api->create('l3l0', 'l3l0repo', $data);
}

/**
* @test
*/
Expand Down