Commit Graph
47 Commits
Author SHA1 Message Date
Diogo Biazus a192cadced All green :D 2015-10-20 19:23:12 -04:00
Joe Nelson aee0c2c731 Test that patch requests can set a field to null
Exploring situation mentioned in #233
2015-09-06 17:07:00 -07:00
Diogo Biazus c34f96ce2e Removes body matcher to compile and test against any aeson version >= 0.8 2015-08-20 16:43:57 -04:00
Diogo Biazus f9d50018d9 Rollback to aeson 0.8.0.2 to allow building with stackage, and adds stack.yml 2015-08-20 15:50:28 -04:00
Richard Allaway 4cf51b7005 fixes spec for changed error message from updated aeson library 2015-08-17 11:10:15 -04:00
Diogo Biazus c76864a653 Qualifies columns used in WHERE clauses so we can use computed columns as filters 2015-07-10 12:35:24 -04:00
Federico Rampazzo 83f48dcd15 User_id support (via user_vars) 2015-05-24 03:26:42 +01:00
Joe Nelson 709e70561f Provide more information in PATCH response
* 404 if no records updated
* Range header for number updated
* Full results depending on Prefer header

Fixes #187
Fixes #182
2015-05-12 10:47:55 -07:00
Joe Nelson 5688030104 Allow posting JSON array and object
Fixes #168

Fixes #156
2015-04-19 17:46:11 -07:00
Joe Nelson fbc90bdb84 Tests for csv bulk import
Fixes #17
2015-04-17 15:42:58 -07:00
Joe Nelson 42d3d0de6c Fix location header for inserted objects with nulls 2015-03-15 18:26:32 -07:00
Joe Nelson ddb5ba8b64 Can now post nulls, but header link is wrong
affects #166
2015-03-15 16:30:42 -07:00
Joe Nelson 5be0b5d5ae Return inserted object from POST when Prefer: return=representation
Fixes #27
Fixes #159
2015-03-01 21:42:05 -08:00
Joe Nelson e37d5d9b25 Style tweak 2015-02-15 15:59:49 -08:00
Joe Nelson 90f9b00e5e Include JSON content type for errors 2015-01-31 12:33:44 -08:00
Joe Nelson f06f3e3394 Isolate tests
Credentials from AuthSpec were interfering with StructureSpec
2015-01-31 11:32:08 -08:00
Adam C. Baker c9b960f955 only create schema once 2014-12-29 17:57:31 -08:00
Adam C. Baker 3756309b22 create items in test, not in the schema. 2014-12-29 17:57:31 -08:00
Adam C. Baker 2ae99daa12 resetDb once for each set of tests. 2014-12-29 17:57:31 -08:00
Joe Nelson f689ce684a Provide proper JSON details for errors
Refines HTTP codes for server vs client problems

Fixes #92
Fixes #40
2014-12-21 19:34:21 -08:00
Joe Nelson 9712549d64 Use "::unknown" type casts to overcome binary protocol restrictions
Fixes #112
2014-12-16 20:09:01 -08:00
Joe Nelson 13bc9a4510 Lock hasql version for now 2014-12-06 17:42:22 -08:00
Joe Nelson 5900475460 Reset db between tests rather than using transactions to accomodate Hasql limitation 2014-12-06 17:42:21 -08:00
Joe Nelson 4eb4d8da1e Removed test for RFC compliance
Who would send Content-Range anyway, that is weird in this context
2014-12-06 17:42:21 -08:00
Joe Nelson f6b7b42d75 Feature specs compile 2014-12-06 17:42:20 -08:00
Joe Nelson 58adb5e828 Allow patch requests
Fixes #87
2014-11-06 23:49:29 -08:00
Joe Nelson 76ea92bfce Derp, actually put the data on a put request 2014-11-06 18:31:13 -08:00
Adam C. Baker 74855db87b declare required extensions
and remove default extension pragmas (OverloadedStrings)
2014-11-05 00:32:10 -08:00
Joe Nelson c163e2156c Indicate input json parse error with better message
Fixes #42
2014-10-14 19:23:56 -07:00
Joe Nelson 80c55789b5 Remove getHeader, fixes #77 2014-10-14 10:30:23 -07:00
Joe Nelson 9c84cf9c3d Fix lint warnings 2014-10-13 18:16:41 -07:00
Adam C. Baker fd237b33b1 fix/unpend tests. 2014-10-13 16:54:21 -07:00
Joe Nelson a34051b177 Successful PUT requests actually return 200 2014-10-09 18:00:37 -07:00
Joe Nelson ecff987f31 Include "enum" field in column details 2014-10-08 16:51:42 -07:00
Joe Nelson b52af7ac66 Make tests pending and revisit after Friday deadline 2014-10-08 14:58:38 -07:00
Adam C. Baker cf5510c425 upgrade hspec-wai, get tests passing. 2014-09-24 19:08:05 -07:00
Joe Nelson 9f2a01ae46 WIP: do crazy postgres upsert 2014-09-09 22:46:42 -07:00
Joe Nelson 22114532e6 WIP: put requests 2014-09-07 22:03:45 -07:00
Joe Nelson 4d81959a2a Fix Location link in post to db lacking a primary key
Fixes #29
2014-09-07 14:12:51 -07:00
Joe Nelson 63e3d69f4d Be stricter about partial content response 2014-09-07 10:47:57 -07:00
Adam C. Baker e7344bf16f extract test type, add useful functionality. 2014-09-04 01:00:48 -07:00
Joe Nelson d77e00d93b Ensure location header contains _a_ number, not a particular number 2014-09-01 21:13:46 -07:00
Joe Nelson d06674a1e8 Test insertion of various json types 2014-08-27 12:48:41 -07:00
Joe Nelson 134ca1f2a8 Parse JSON -> SqlValue as Int as well as Double when possible 2014-08-26 22:38:09 -07:00
Joe Nelson c007dbb2b2 WIP: Testing compound key insert reveals weird type conversion 2014-08-25 19:43:23 -07:00
Joe Nelson eef7860922 Test failed post, and clean up specs 2014-08-25 17:27:21 -07:00
Joe Nelson f34f8d8c35 Separate tests into groups
Also test content of insert redirect
2014-08-25 16:53:44 -07:00