Skip to content

Commit

Permalink
#390 replaced empty conversations test with pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyprian Laskowski authored and cyplas committed Dec 12, 2022
1 parent f9df308 commit 1417fb3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
10 changes: 10 additions & 0 deletions app/conversations/tests/test_conversations_routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,3 +238,13 @@ def test_consent_sends_user_b_shared_email_with_configured_base_frontend_url(
subject_starts_with="Ready for a climate conversation",
base_frontend_url="https://fake-url.local",
)

def test_get_conversations_empty(client_with_user_and_header, accept_json):
client, user, session_header, _ = client_with_user_and_header
url = url_for("conversations.get_conversations")
response = client.get(
url,
headers=session_header + accept_json,
)
assert response.status_code == 200, str(response.json)
assert response.json == {"conversations":[]}
13 changes: 0 additions & 13 deletions cypress/e2e/conversations.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,17 +229,4 @@ describe("'/conversation' endpoint", () => {
});
});

it("should get an empty conversations array when no converstion has been created yet", () => {
//Get conversations and validate the response body
cy.conversationsEndpoint(accessToken, session_Id)
.should((response) => {
expect(response.status).to.equal(200);
expect(response.headers["content-type"]).to.equal(
"application/json"
);
expect(response.body).to.deep.equal({
"conversations": []
})
});
});
});

0 comments on commit 1417fb3

Please sign in to comment.