Joe Nelson
5e3d9442af
Use table defaults for empty object insert
...
Fixes #616
2016-06-02 08:40:24 -07:00
Christopher League
0940b2dccf
Simplify serialization of location header
...
Possible after bug fix in a Hasql that we picked up with the new
dependency bounds in #606 . Also includes test to ensure location header
is omitted on bulk insert.
2016-05-22 21:54:26 -04:00
Christopher League
5c38b4328b
URL-encode Location header ( closes #588 )
...
The database returns an array of key-value strings like `"k1=eq.hello
world"`. Haskell URL-encodes the portion after the equal sign and joins
them with `&`.
Includes updates to tests in Feature.InsertSpec: The CompoundPK has been
modified to have one Int and one String. We attempt to add a key with a
String that has spaces and other special characters. This requires that
the returned Location header is properly URL-encoded.
2016-05-20 10:42:55 -04:00
Joe Nelson
7e41b620ff
Accept POST requests from HTML forms
2016-05-15 20:55:07 -07:00
Joe Nelson
d9205bd838
Do not include Content-Type header for empty body ( #580 )
...
* Do not include Content-Type header for empty body
Fixes #544
* Fix lint
* Changelog
2016-05-03 21:18:23 -07:00
Joe Nelson
3c5fab009b
Remove ancient test comments
2016-03-13 14:22:36 -07:00
Joe Nelson
b858626e17
For correctness include charset=utf-8 in responses
2016-03-13 14:22:17 -07:00
Joe Nelson
330cc91645
Protect unicode values in requests
2016-03-13 14:20:54 -07:00
Joe Nelson
d7fe59f0b0
WIP: share server code between tests and program
...
- Share server code in Main
- Switch to hasql-pool
- Use pool in tests
- DRY up test runner
2016-02-21 12:22:18 -08:00
Moti Zilberman
4dd4eeb421
[ci skip] s/unkonwn/unknown/
2016-02-08 16:39:32 +02:00
Moti Zilberman
b50882db3a
[ci skip] Fix typo in InsertSpec
2016-02-08 15:53:15 +02:00
Moti Zilberman
0058b5df99
Minor proofreading in InsertSpec
...
s/csv/json/ in line 24
2016-02-08 14:29:47 +02:00
Joe Nelson
b9fd083c77
It all compiles but all requests give a postgres error
2016-01-24 18:09:19 -08:00
Joe Nelson
fec316b087
WIP: fixing compiler errors in specs
2016-01-24 18:09:19 -08:00
Simone Scarduzio
74d76c690f
Adding two test cases for 469
2016-01-24 14:52:14 +00:00
Moti Zilberman
9a596c2500
pgFmtLit: Change condition for using E"..." syntax, fix #458 .
...
Includes a test spec by @diogob.
2016-01-15 11:59:25 +02:00
Joe Nelson
b26fbaf4db
Merge pull request #427 from ruslantalpa/fix_407_week_authenticator_role
...
Fix errors in tests when setting authenticator to noinherit #407
2015-12-19 09:34:24 -08:00
Ruslan Talpa
66a34fccdf
Fix errors in tests when setting authenticator to noinherit
2015-12-16 11:44:28 +02:00
Ruslan Talpa
4544ce3255
Fix #399 insert records in tables with no SELECT privileges
2015-12-16 10:16:14 +02:00
Joe Nelson
ccadcec6d5
Merge branch 'spec-cache-dbstructure'
2015-12-11 09:42:26 -08:00
Joe Nelson
b3144aee15
Cache schema structure between tests for speed
...
Causes one test to fail
2015-12-10 13:36:28 -08:00
Ruslan Talpa
dad41cd3ed
Fix #396 include records with missing parents and remove CTE related to parent relation
2015-12-09 14:21:27 +02:00
Diogo Biazus
0961524e70
Refactors tests to use new fixtures and remove some haskell functions that wont be necessary anymore
2015-12-08 00:44:49 -05:00
Joe Nelson
f4c73c7666
Test for --max-rows behavior
2015-12-05 19:31:53 -08:00
Joe Nelson
029276bd62
Use brackets to specify subqueries
2015-11-23 10:58:04 -08:00
Ruslan Talpa
cf2e45d47f
Fix lint issue
2015-11-20 16:11:21 +02:00
Ruslan Talpa
0cce22f8c1
check request payload for structure & remove bad test for csv
2015-11-20 16:07:20 +02:00
Ruslan Talpa
0c3545fa09
App.hs refactor
2015-11-16 12:26:55 +02:00
Ruslan Talpa
246c47dba4
cleanup
2015-10-30 12:19:35 +02:00
Ruslan Talpa
6fd0d5648f
PUT path commented, DELETE rewritten, all statementT functions commented
2015-10-30 12:08:25 +02:00
Ruslan Talpa
f7e6005087
cleanup
2015-10-27 14:14:04 +02:00
Ruslan Talpa
f02b8381ea
shape the response after inserting
2015-10-27 13:16:14 +02:00
Ruslan Talpa
d43bac6e8f
Code cleanup (lint suggestions)
2015-10-26 16:19:54 +02:00
Ruslan Talpa
1fdb700bc8
Fix a few tests
2015-10-26 13:50:56 +02:00
Ruslan Talpa
21bd921ee7
Merge remote-tracking branch 'begriffs/v3' into v3
2015-10-23 09:15:00 +03:00
Ruslan Talpa
ca4014f751
a few more tests fixed (2)
2015-10-22 17:03:06 +03:00
Ruslan Talpa
2662e24991
a few more tests fixed
2015-10-22 16:17:23 +03:00
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