Skip to content

Commit bbbc030

Browse files
author
Matt Humphrey
committed
Added test for updating project
1 parent 8ea80ac commit bbbc030

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

test/Gitlab/Tests/Api/ProjectsTest.php

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,26 @@ public function shouldCreateProject()
118118
)));
119119
}
120120

121+
/**
122+
* @test
123+
*/
124+
public function shouldUpdateProject()
125+
{
126+
$expectedArray = array('id' => 1, 'name' => 'Updated Name');
127+
128+
$api = $this->getApiMock();
129+
$api->expects($this->once())
130+
->method('put')
131+
->with('projects/1', array('name' => 'Updated Name', 'issues_enabled' => true))
132+
->will($this->returnValue($expectedArray))
133+
;
134+
135+
$this->assertEquals($expectedArray, $api->update(1, array(
136+
'name' => 'Updated Name',
137+
'issues_enabled' => true
138+
)));
139+
}
140+
121141
/**
122142
* @test
123143
*/

0 commit comments

Comments
 (0)