Skip to content

Commit e08cd0f

Browse files
drummm1guelpf
authored andcommitted
Add test
1 parent 66fb676 commit e08cd0f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/Gitlab/Tests/Api/UsersTest.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,17 @@ public function shouldUpdateUser()
161161
;
162162

163163
$this->assertEquals($expectedArray, $api->update(3, array('name' => 'Billy Bob')));
164+
165+
$expectedArray = array('id' => 4, 'avatar_url' => 'http://localhost:3000/uploads/user/avatar/4/image.jpg');
166+
167+
$api = $this->getApiMock();
168+
$api->expects($this->once())
169+
->method('put')
170+
->with('users/4', array(), array(), array('avatar' => '/some/image.jpg'))
171+
->will($this->returnValue($expectedArray))
172+
;
173+
174+
$this->assertEquals($expectedArray, $api->update(4, array(), array('avatar' => '/some/image.jpg')));
164175
}
165176

166177
/**

0 commit comments

Comments
 (0)