diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8e5d186..9693bc1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,8 @@ name: Test and Publish on: push: branches: [ main ] + pull_request: + branches: [ main ] workflow_dispatch: jobs: diff --git a/consumer/test_contract.py b/consumer/test_contract.py index acedb94..a58177e 100644 --- a/consumer/test_contract.py +++ b/consumer/test_contract.py @@ -10,12 +10,12 @@ def test_get_user(): - expected = {"id": 1, "name": "John Doe"} + expected = {"id": 1, "name": "John Doe", "title": "head"} # Define the interaction ( pact.upon_receiving("a request for user with ID 1") - .given("User with ID 2 exists") + .given("User with ID 1 exists") .with_request("GET", "/users/1") .will_respond_with(200, body=expected) )