issues
search
ITsvetkoFF
/
Kv-013
7
stars
1
forks
source link
Fix search users
#140
Closed
craHUNzyTER
closed
8 years ago
craHUNzyTER
commented
8 years ago
[ ]
File: DevelopGitHub/GitHubExtension/GitHubExtension.Security.WebApi/Extensions/SecurityContext/SecurityContextUserExtension.cs:L8-22
<img border=0 src='
https://avatars.githubusercontent.com/u/6068068?v=3
' height=16 width=16'> But I don't see any unit tests on this extension method. Are you sure that it's not braking changes?
<img border=0 src='
https://avatars.githubusercontent.com/u/15123688?v=3
' height=16 width=16'> I'm sure :) But I will add unit tests to prevent braking changes in the future.
<img border=0 src='
https://avatars.githubusercontent.com/u/6068068?v=3
' height=16 width=16'> Cool. Waiting a test from you!
<img border=0 src='
https://avatars.githubusercontent.com/u/15123688?v=3
' height=16 width=16'> Added. Please, check.
[ ]
File: DevelopGitHub/GitHubExtension/GitHubExtension.Security.Tests/TestExtensions/SecurityContextUserExtensionTests.cs:L1-82
<img border=0 src='
https://avatars.githubusercontent.com/u/6068068?v=3
' height=16 width=16'> Interesting test. So as I understand in a real scenarion will be sending request to DB and checking that user exists or not?
<img border=0 src='
https://avatars.githubusercontent.com/u/15123688?v=3
' height=16 width=16'> In real scenario request will be send to DB and get all users that contain searching string in their userName except current user (that sent request).
<img border=0 src='
https://avatars.githubusercontent.com/u/6068068?v=3
' height=16 width=16'> Are you sure that Contains which are you using for testing the same which goes to DB?