daily pastebin goal
44%
SHARE
TWEET

Untitled

a guest Jul 21st, 2017 478 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. @questions @delete
  2. Feature: delete existing question
  3.   In order delete questions
  4.   As a logged user
  5.   I need to be able to delete existing question
  6.  
  7.   @smoke @delete_question
  8.   Scenario: Delete question by author
  9.     Given follow email users:
  10.       | email               | plainPassword | firstname | lastname |
  11.       | question@test.com   | 1234567       | FirstName | LastName |
  12.       | comment@test.com    | 1234567       | John      | Smith    |
  13.     Given follow questions:
  14.       | author            | title          | body          |
  15.       | question@test.com | Question Title | Question body |
  16.     Given I remember "last created question id"
  17.     Given I am successfully logged in with email: "question@test.com" and password: "1234567"
  18.     When I send a DELETE request to "/api/questions/{last_created_question_id}"
  19.     Then the response code should be 204
  20.  
  21.   @smoke @voter
  22.   Scenario: Forbidden deleting question of other users
  23.     Given follow email users:
  24.       | email               | plainPassword | firstname | lastname |
  25.       | question@test.com   | 1234567       | FirstName | LastName |
  26.       | comment@test.com    | 1234567       | John      | Smith    |
  27.     Given follow questions:
  28.       | author            | title          | body          |
  29.       | question@test.com | Question Title | Question body |
  30.     Given I remember "last created question id"
  31.     Given I am successfully logged in with email: "comment@test.com" and password: "1234567"
  32.     When I send a DELETE request to "/api/questions/{last_created_question_id}"
  33.     Then the response code should be 403
  34.  
  35.   @smoke @voter
  36.   Scenario: Forbidden deleting of non existent question
  37.     Given follow email users:
  38.       | email               | plainPassword | firstname | lastname |
  39.       | question@test.com   | 1234567       | FirstName | LastName |
  40.       | comment@test.com    | 1234567       | John      | Smith    |
  41.     Given follow questions:
  42.       | author            | title          | body          |
  43.       | question@test.com | Question Title | Question body |
  44.     Given I remember "last created question id"
  45.     Given I am successfully logged in with email: "question@test.com" and password: "1234567"
  46.     When I send a DELETE request to "/api/questions/100000000000"
  47.     Then the response code should be 404
  48.     Then I send a DELETE request to "/api/questions/{last_created_question_id}"
  49.     And the response code should be 204
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top