Skip to content

Commit

Permalink
109728: Added test to check that getVocabularyEntriesByValue encodes …
Browse files Browse the repository at this point in the history
…its value
  • Loading branch information
alexandrevryghem committed Dec 28, 2023
1 parent 7915202 commit 989b7f5
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/app/core/submission/vocabularies/vocabulary.service.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,18 @@ describe('VocabularyService', () => {
})
}));
});

it('should encode the value', () => {
scheduler.schedule(() => service.getVocabularyEntriesByValue('https://creativecommons.org/licenses/by-sa/4.0/', false, vocabularyOptions, pageInfo).subscribe());
scheduler.flush();

expect(service.findVocabularyById).toHaveBeenCalledWith(vocabularyOptions.name, true, true, jasmine.objectContaining({
findListOptions: jasmine.objectContaining({
filter: 'https%3A%2F%2Fcreativecommons.org%2Flicenses%2Fby-sa%2F4.0%2F',
exact: false,
})
}));
});
});

describe('getVocabularyEntryByValue', () => {
Expand Down

0 comments on commit 989b7f5

Please sign in to comment.