# freeCodeCamp API Test Automation for Beginners. Issue with assignment #2

**URL:** <https://community.postman.com/t/freecodecamp-api-test-automation-for-beginners-issue-with-assignment-2/73128>\
**Category:** Help Hub\
**Tags:** help, postman-api, community\_help\
**Created:** [December 26, 2024, 11:26pm UTC](https://community.postman.com/t/freecodecamp-api-test-automation-for-beginners-issue-with-assignment-2/73128 "2024-12-26T23:26:40Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![klayne1129](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@klayne1129](https://community.postman.com/u/klayne1129)\
**Post date:** [December 26, 2024, 11:26pm UTC](https://community.postman.com/t/freecodecamp-api-test-automation-for-beginners-issue-with-assignment-2/73128/1 "2024-12-26T23:26:40Z")

</div>

Hi there. I’m having an issue with Assignment 2 for Postman API Test Automation for Beginners by freecodecamp by [‪@vdespa‬](https://www.youtube.com/@vdespa).

I am having the same error as @mortypython1 but the fix listed in that post did not resolve my error, so im trying to figure out what the issue is.

The assignment was to add a status 200 test for each request. Which I have done. But I’m getting this test failure message:

> orders \> Create a new order: contains status code test | AssertionError: check script: expected ‘pm.test(“Status code is 200”, functio…’ to include ‘pm.expect(pm.response.code).to.eql(20…’

Here is a screenshot of the test script that is failing:

 ![Screen Shot 2024-12-26 at 5.16.14 PM](https://us1.discourse-cdn.com/getpostman/original/3X/1/3/13276e8ce764dd3d3311d56dec294064c3128179.png)

And this screenshot shows the failed test message and part of the script from the ‘Verify your work’ request.

 ![Screen Shot 2024-12-26 at 5.19.16 PM](https://us1.discourse-cdn.com/getpostman/original/3X/6/e/6e852b38b50e09a19d642889ed2e8b927d80677c.png)

I’m new to this so i’m not really sure why this has failed. Any advice on what to try next?

---

<div class="post-metadata">

**Author:** ![danny-dainton](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/danny-dainton/32/29401_2.png) [@danny-dainton](https://community.postman.com/u/danny-dainton)\
**Post date:** [December 27, 2024, 12:07am UTC](https://community.postman.com/t/freecodecamp-api-test-automation-for-beginners-issue-with-assignment-2/73128/2 "2024-12-27T00:07:27Z")

</div>

Hey @klayne1129

You have 2 assertions in that test for the same thing. Does removing the one on line 2 and saving it help, when you resubmit the assessment?

---

<div class="post-metadata">

**Author:** ![klayne1129](https://avatars.discourse-cdn.com/v4/letter/k/ecc23a/32.png) [@klayne1129](https://community.postman.com/u/klayne1129)\
**Post date:** [December 27, 2024, 1:57am UTC](https://community.postman.com/t/freecodecamp-api-test-automation-for-beginners-issue-with-assignment-2/73128/3 "2024-12-27T01:57:14Z")

</div>

Unfortunately no it still fails the test.

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/getpostman/user_avatar/community.postman.com/system/32/29796_2.png) [@system](https://community.postman.com/u/system)\
**Post date:** [March 27, 2025, 1:58am UTC](https://community.postman.com/t/freecodecamp-api-test-automation-for-beginners-issue-with-assignment-2/73128/4 "2025-03-27T01:58:05Z")

</div>

Closed on March 27, 2025, 1:58am UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
