# Check that the body does not have a text

**URL:** <https://community.postman.com/t/check-that-the-body-does-not-have-a-text/25431>\
**Category:** Help Hub\
**Tags:** tests\
**Created:** [July 2, 2021, 2:46pm UTC](https://community.postman.com/t/check-that-the-body-does-not-have-a-text/25431 "2021-07-02T14:46:13Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![andresdurangof](https://avatars.discourse-cdn.com/v4/letter/a/dc4da7/32.png) [@andresdurangof](https://community.postman.com/u/andresdurangof)\
**Post date:** [July 2, 2021, 2:46pm UTC](https://community.postman.com/t/check-that-the-body-does-not-have-a-text/25431/1 "2021-07-02T14:46:13Z")

</div>

**Your question may already have an answer on the community forum. Please search for related topics, and then read through the [guidelines](https://community.postman.com/t/about-the-just-getting-started-category/37) before creating a new topic.**

> Here’s an outline with best practices for making your inquiry.

_My question_:  
I am trying to make a test and check that the body does not have a text, but I can only find the code that does:  
pm.expect(pm.response.text()).to.include(“string to search for”);.  
Do you know which one I could use, I need that in the response it does not contain the “uid”.

---

<div class="post-metadata">

**Author:** ![pranavdavar](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/pranavdavar/32/9152_2.png) [@pranavdavar](https://community.postman.com/u/pranavdavar)\
**Post date:** [July 3, 2021, 2:04am UTC](https://community.postman.com/t/check-that-the-body-does-not-have-a-text/25431/2 "2021-07-03T02:04:53Z")

</div>

Hi @andresdurangof, Welcome to the community

you may use the below snippet to test for a response that doesn’t contain a specific test.

`pm.expect(pm.response.text()).not.to.include("Your text");`

You may get more info on writing tests on the [official documentation](https://learning.postman.com/docs/writing-scripts/test-scripts/) page.
