github.com/agilebits/godog@v0.7.9/examples/db/users.feature (about) 1 Feature: users 2 In order to use users api 3 As an API user 4 I need to be able to manage users 5 6 Scenario: should get empty users 7 When I send "GET" request to "/users" 8 Then the response code should be 200 9 And the response should match json: 10 """ 11 { 12 "users": [] 13 } 14 """ 15 16 Scenario: should get users 17 Given there are users: 18 | username | email | 19 | john | john.doe@mail.com | 20 | jane | jane.doe@mail.com | 21 When I send "GET" request to "/users" 22 Then the response code should be 200 23 And the response should match json: 24 """ 25 { 26 "users": [ 27 { 28 "username": "john" 29 }, 30 { 31 "username": "jane" 32 } 33 ] 34 } 35 """ 36 37 Scenario: should get users when there is only one 38 Given there are users: 39 | username | email | 40 | gopher | gopher@mail.com | 41 When I send "GET" request to "/users" 42 Then the response code should be 200 43 And the response should match json: 44 """ 45 { 46 "users": [ 47 { 48 "username": "gopher" 49 } 50 ] 51 } 52 """