Merge pull request #1028 from basho/at_aggregation_negation_tests

Negate an aggregation test
This commit is contained in:
Andy Till 2016-03-29 16:08:39 +01:00
commit 133a37f834

View File

@ -66,6 +66,8 @@ confirm() ->
div_aggregate_function_by_zero_test(Conn, Bucket, Where),
negate_an_aggregation_test(Conn, Bucket, Where),
pass.
%%
@ -83,3 +85,11 @@ div_aggregate_function_by_zero_test(Conn, Bucket, Where) ->
{error,{1001,<<"divide_by_zero">>}},
ts_util:single_query(Conn, Query)
).
%%
negate_an_aggregation_test(Conn, Bucket, Where) ->
Query = "SELECT -COUNT(*), COUNT(*) FROM " ++ Bucket ++ Where,
?assertEqual(
{[<<"-COUNT(*)">>, <<"COUNT(*)">>],[{-10, 10}]},
ts_util:single_query(Conn, Query)
).