-
Notifications
You must be signed in to change notification settings - Fork 0
feat: mark images as inactive #786
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
57a0d10 to
9f4f8bf
Compare
jnatten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Har du testa dette?
Jeg ser ikke helt hvordan det går an å endre feltet?
d1a1250 to
00234a8
Compare
|
|
||
| val inactiveFilter = settings.inactive match { | ||
| case None => None | ||
| case Some(boolVal) => Some(boolQuery().should(termQuery("inactive", boolVal.toString))) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Må vi ha denne toString'en her? Trodde egentlig termQuery skulle støtte å ta i mot boolean direkte
jnatten
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| test("That including inactive images work") { | ||
| val Success(searchResult) = | ||
| imageSearchService.matchingQuery(searchSettings.copy(inactive = Some(true)), None): @unchecked | ||
|
|
||
| searchResult.totalCount should be(1) | ||
| searchResult.results.last.id should be("6") | ||
| } | ||
|
|
||
| test("That excluding inactive images work") { | ||
| val Success(searchResult) = | ||
| imageSearchService.matchingQuery(searchSettings.copy(inactive = Some(true)), None): @unchecked | ||
|
|
||
| searchResult.totalCount should be(1) | ||
| searchResult.results.last.id should be("6") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disse testene er like.
9b1077a to
77d43fc
Compare
https://github.com/NDLANO/Issues/issues/4442
Hvis du ikke inkluderer inactive i det hele tatt får du både ut aktive og inaktive bilder i resultatet.