Skip to content
This repository has been archived by the owner on Mar 24, 2021. It is now read-only.

Commit

Permalink
Add test for better error message for bad JSON
Browse files Browse the repository at this point in the history
When we pass invalid JSON we should get a sensible message.

https://www.pivotaltracker.com/story/show/69911234
  • Loading branch information
Paul M Furley committed May 8, 2014
1 parent 0b8edd7 commit 04177a5
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions features/write_api/write_api.feature
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,14 @@ Feature: the performance platform write api
then I should get back a status of "200"
and the stored data should contain "3" "_week_start_at" on "2013-03-11"
and the stored data should contain "2" "_week_start_at" on "2013-03-18"

Scenario: posting invalid JSON to a data-set
Given I have JSON data '{borked!}'
and I have a data_set named "data_with_times" with settings
| key | value |
| data_group | "group" |
| data_type | "type" |
and I use the bearer token for the data_set
when I POST to the specific path "/data/group/type"
then I should get back a status of "400"
and I should get back the message "Invalid JSON: "ValueError: Expecting property name: line 1 column 1 (char 1)""

0 comments on commit 04177a5

Please sign in to comment.