-
-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b2451cd
commit 0ecae9a
Showing
1 changed file
with
81 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,6 +325,87 @@ test_photos_promoted () { | |
} | ||
|
||
test_verified_promoted () { | ||
setup | ||
seq 250 | xargs -I'{}' ../util/create-user.sh "extrauser{}" 0 0 | ||
|
||
q "delete from photo" | ||
q "update person set has_profile_picture_id = 1" | ||
q "update person set verification_level_id = 1" | ||
|
||
q " | ||
update person | ||
set personality = array_full(47, 0)" | ||
q " | ||
update person | ||
set personality = array_full(47, 9e-2) | ||
where email IN ('[email protected]', '[email protected]')" | ||
q " | ||
update person | ||
set personality = array_full(47, 8e-2) | ||
where email IN ('[email protected]')" | ||
q " | ||
update person | ||
set personality = array_full(47, 7e-2) | ||
where email IN ('[email protected]')" | ||
q " | ||
update person | ||
set personality = array_full(47, 6e-2) | ||
where email IN ('[email protected]')" | ||
q " | ||
update person | ||
set personality = array_full(47, 5e-2) | ||
where email IN ('[email protected]')" | ||
q " | ||
update person | ||
set personality = array_full(47, 4e-2) | ||
where email IN ('[email protected]')" | ||
q " | ||
update person | ||
set personality = array_full(47, 3e-2) | ||
where email IN ('[email protected]')" | ||
|
||
local response=$(c GET '/search?n=5&o=0' | jq -r '[.[].name] | join(" ")') | ||
[[ "$response" = 'user1 user2 extrauser1 extrauser2 extrauser3' ]] | ||
|
||
q " | ||
update | ||
person | ||
set | ||
verification_level_id = 2 | ||
where | ||
name = 'extrauser1' | ||
" | ||
|
||
local response=$(c GET '/search?n=5&o=0' | jq -r '[.[].name] | join(" ")') | ||
[[ "$response" = 'user1 user2 extrauser1 extrauser2 extrauser3' ]] | ||
|
||
q " | ||
update | ||
person | ||
set | ||
verification_level_id = 2 | ||
where | ||
name <> 'user1' | ||
and | ||
name <> 'extrauser3' | ||
" | ||
|
||
local response=$(c GET '/search?n=5&o=0' | jq -r '[.[].name] | join(" ")') | ||
[[ "$response" = 'user2 extrauser1 extrauser2 extrauser4 extrauser5' ]] | ||
|
||
# If the searcher isn't verified, they don't necessarily see verified members | ||
# first | ||
q " | ||
update | ||
person | ||
set | ||
verification_level_id = 1 | ||
where | ||
name = 'searcher' | ||
" | ||
|
||
local response=$(c GET '/search?n=5&o=0' | jq -r '[.[].name] | join(" ")') | ||
[[ "$response" = 'user1 user2 extrauser1 extrauser2 extrauser3' ]] | ||
} | ||
|
||
test_quiz_filters () { | ||
|
@@ -801,9 +882,6 @@ test_pending_club_cleared () { | |
} | ||
|
||
|
||
test_verified_promoted | ||
exit 42 | ||
|
||
test_pending_club_cleared | ||
|
||
test_clubs | ||
|