Beispiel #1
0
        public async Task Should_Update_A_Common_User()
        {
            const string newName = "newName";
            const string newRole = "admin";

            await _service.UpdateAsync(1, new UpdateCommonUserDto
            {
                Name        = newName,
                Email       = "*****@*****.**",
                Description = "new description",
                Phone       = "15338593769",
                Sex         = "boy",
                Role        = newRole
            });

            var updated = await _service.GetAsync(1);

            updated.Name.ShouldBe(newName);
            updated.Role.ShouldBe(newRole);
        }
Beispiel #2
0
 public async Task <CommonUserDto> UpdateAsync(long id, [FromBody] UpdateCommonUserDto input)
 {
     return(await _service.UpdateAsync(id, input));
 }