Last active
August 29, 2015 13:55
-
-
Save kevinswiber/8696975 to your computer and use it in GitHub Desktop.
Exploring hypermedia aware acceptance testing.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Feature: Root Resource | |
As an API client | |
I want to see the root resource | |
So that I have a starting point to complete my task. | |
Scenario: Request the root | |
Given an anonymous client | |
When I make a GET request to / | |
Then I should get a 200 status code | |
And the content type should be JSON | |
Scenario: Request the hypermedia root | |
Given an anonymous client | |
When I make a request to the root URI | |
Then the request should succeed | |
And the response media type should be Siren | |
And the response should include a self link |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@zdne
Certainly. The only reason I made the distinction of "hypermedia" in the scenario is because I'm actually executing the specifications and needed a way to distinguish between the two. :)
This is still riddled with technical details that are irrelevant to the domain. Of course, I have a lot more experience writing automated acceptance tests for domain logic, not APIs. When the reader happens to be a developer, perhaps this is perfectly acceptable. Thoughts?