forked from piotrmurach/github
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathemails.feature
More file actions
40 lines (32 loc) · 1.54 KB
/
emails.feature
File metadata and controls
40 lines (32 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Feature: Accessing Users Emails API
In order to interact with github user emails
GithubAPI gem
Should return the expected results depending on passed parameters
Background:
Given I have "Github::Users::Emails" instance
Scenario: Lists all emails for the authenticated user
Given I want to list resources
When I make request within a cassette named "users/emails/all"
Then the response status should be 200
And the response type should be JSON
And the response should not be empty
Scenario: Add email addresses for the authenticated user
Given I want to add resource with the following params:
| email1 | email2 |
| octocat@example.com | terry@example.com |
When I make request within a cassette named "users/emails/add"
Then the response status should be 201
And the response type should be JSON
And the response should have 3 items
And the response should contain octocat@example.com
And the response should contain terry@example.com
Scenario: Remove email addresses for the authenticated user
Given I want to add resource with the following params:
| email1 | email2 |
| octocat@example.com | terry@example.com |
And I make request within a cassette named "users/emails/add"
And I want to delete resource with the following params:
| email |
| octocat@example.com |
When I make request within a cassette named "users/emails/delete"
Then the response status should be 204