Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Conversation

open-schnick
Copy link
Member

No description provided.

@open-schnick open-schnick added the Feature Feature Label label Nov 20, 2020
@open-schnick open-schnick requested a review from a team November 20, 2020 23:13
@open-schnick
Copy link
Member Author

Tests need to be fixed, Unit test to be written. @qvalentin @Gimleux can you write more scenarios that you want to test e.g. user groups, when an admin user wants to change a different user etc..

@codecov
Copy link

codecov bot commented Nov 21, 2020

Codecov Report

Merging #34 (596c144) into master (f128c9d) will increase coverage by 2.33%.
The diff coverage is 94.11%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master      #34      +/-   ##
============================================
+ Coverage     69.77%   72.10%   +2.33%     
- Complexity      210      234      +24     
============================================
  Files            57       59       +2     
  Lines           655      717      +62     
  Branches         38       52      +14     
============================================
+ Hits            457      517      +60     
  Misses          189      189              
- Partials          9       11       +2     
Impacted Files Coverage Δ Complexity Δ
...omain/user/exceptions/UserNotUpdatedException.java 50.00% <50.00%> (ø) 1.00 <1.00> (?)
...rest/domain/user/business/UserBusinessService.java 95.76% <94.91%> (+0.24%) 39.00 <20.00> (+19.00)
...ain/token/business/AccessTokenBusinessService.java 100.00% <100.00%> (ø) 14.00 <0.00> (ø)
...domain/user/business/UserAuthorizationService.java 90.69% <100.00%> (+0.45%) 14.00 <5.00> (ø)
...t/domain/user/exceptions/UserNotUpdatedAdvise.java 100.00% <100.00%> (ø) 2.00 <2.00> (?)
...hter/rest/domain/user/rest/UserRestController.java 100.00% <100.00%> (ø) 8.00 <2.00> (ø)
...fighter/rest/domain/user/rest/UserRestService.java 100.00% <100.00%> (+3.84%) 7.00 <6.00> (+1.00)
.../de/filefighter/rest/domain/user/group/Groups.java 100.00% <0.00%> (+10.00%) 4.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f128c9d...596c144. Read the comment docs.

@open-schnick open-schnick marked this pull request as ready for review November 21, 2020 13:50
String username = userToUpdate.getUsername();
if (null != username) {
if (!stringIsValid(username))
throw new UserNotUpdatedException("Wanted to change username, but username was not valid.");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but new username..


Query query = new Query();
query.addCriteria(Criteria.where("userId").is(userId));
mongoTemplate.findAndModify(query, newUpdate, UserEntity.class);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

}
if (password != null) {
jsonString.append("\"password\": \"").append(password).append(username != null?"\",":"");
jsonString.append("\"password\": \"").append(password).append(username != null ? "\"," : "\"");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ups

@open-schnick open-schnick merged commit 1760d8a into master Nov 21, 2020
@open-schnick open-schnick deleted the feature/FF-106 branch November 21, 2020 14:53
Gimleux pushed a commit that referenced this pull request May 20, 2021
* fixed tests, added shallow logic.

* updated feature files, and step def.

* FF-106 Write Logic for User Edit

* Tweaked Cucumber Steps. Fixed Serialization.

* Added additional check, fixed some bugs.

* FF-106 Wrote UnitTests for User Edit

* Damn you password check.

* Bumped Version to v0.0.5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Feature Label
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants