# Test api of response with include and oneOf

**URL:** <https://community.postman.com/t/test-api-of-response-with-include-and-oneof/12750>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [May 19, 2020, 1:51pm UTC](https://community.postman.com/t/test-api-of-response-with-include-and-oneof/12750 "2020-05-19T13:51:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![baramee1407](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/baramee1407/32/4501_2.png) [@baramee1407](https://community.postman.com/u/baramee1407)\
**Post date:** [May 19, 2020, 1:51pm UTC](https://community.postman.com/t/test-api-of-response-with-include-and-oneof/12750/1 "2020-05-19T13:51:58Z")

</div>

Let say my api response with a greeting text. It can be one of ‘Hello’ or ‘Salut!’ then follow with a username depends on user’s preferred language. How to test whether the api return one of the two?

I try `pm.expect(pm.response.text()).to.include.oneOf(["Hello", "Salut!"]);` but didn’t work.  
Any Suggestion?

---

<div class="post-metadata">

**Author:** ![singhsivcan](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/singhsivcan/32/1595_2.png) [@singhsivcan](https://community.postman.com/u/singhsivcan)\
**Post date:** [May 19, 2020, 2:15pm UTC](https://community.postman.com/t/test-api-of-response-with-include-and-oneof/12750/2 "2020-05-19T14:15:37Z")

</div>

Hey @baramee1407, can you please provide the response of the API for the community to assist you better? 🙂
