Sha256: ebc41ccf3fb4487dd8047498e486203924e94019ee8d0afccf566f9b5492bb40

Contents?: true

Size: 1.87 KB

Versions: 14

Compression:

Stored size: 1.87 KB

Contents

### A pact between Zoo App and Animal Service

#### Requests from Zoo App to Animal Service

* [A request for an alligator](#a_request_for_an_alligator_given_there_is_an_alligator_named_Mary) given there is an alligator named Mary

* [A request for an alligator](#a_request_for_an_alligator_given_there_is_not_an_alligator_named_Mary) given there is not an alligator named Mary

* [A request for an alligator](#a_request_for_an_alligator_given_an_error_occurs_retrieving_an_alligator) given an error occurs retrieving an alligator

#### Interactions

<a name="a_request_for_an_alligator_given_there_is_an_alligator_named_Mary"></a>
Given **there is an alligator named Mary**, upon receiving **a request for an alligator** from Zoo App, with
```json
{
  "method": "get",
  "path": "/alligators/Mary",
  "headers": {
    "Accept": "application/json"
  }
}
```
Animal Service will respond with:
```json
{
  "status": 200,
  "headers": {
    "Content-Type": "application/json;charset=utf-8"
  },
  "body": {
    "name": "Mary"
  }
}
```
<a name="a_request_for_an_alligator_given_there_is_not_an_alligator_named_Mary"></a>
Given **there is not an alligator named Mary**, upon receiving **a request for an alligator** from Zoo App, with
```json
{
  "method": "get",
  "path": "/alligators/Mary",
  "headers": {
    "Accept": "application/json"
  }
}
```
Animal Service will respond with:
```json
{
  "status": 404
}
```
<a name="a_request_for_an_alligator_given_an_error_occurs_retrieving_an_alligator"></a>
Given **an error occurs retrieving an alligator**, upon receiving **a request for an alligator** from Zoo App, with
```json
{
  "method": "get",
  "path": "/alligators/Mary",
  "headers": {
    "Accept": "application/json"
  }
}
```
Animal Service will respond with:
```json
{
  "status": 500,
  "headers": {
    "Content-Type": "application/json;charset=utf-8"
  },
  "body": {
    "error": "Argh!!!"
  }
}
```

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
pact-1.4.0.rc4 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.4.0.rc3 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.4.0.rc2 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.3.3 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.3.2 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.3.1 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.3.0 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.2.1.rc2 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.2.1.rc1 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.1.1 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.1.0 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.1.0.rc5 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.1.0.rc4 example/zoo-app/doc/pacts/markdown/Zoo App - Animal Service.md
pact-1.1.0.rc3 example/zoo-app/doc/markdown/Zoo App - Animal Service.md