Remove unused test
[dbsrgits/SQL-Abstract-2.0-ish.git] / t / 900_errors.t
CommitLineData
ef0d6124 1use strict;
2use warnings;
3
4use Test::More tests => 3;
5use Test::Exception;
6
7use_ok('SQL::Abstract') or BAIL_OUT( "$@" );
8
9my $sqla = SQL::Abstract->create(1);
10
11throws_ok {
12 $sqla->dispatch(
13 { -type => 'expr', op => '==',
14 args => [
15 { -type => 'name', args => [qw/me id/] },
16 { -type => 'alias', ident => { -type => 'name', args => [qw/me id/] }, as => 'bar' }
17 ]
18 }
19 )
20} qr/^'alias' is not a valid AST type in an expression/, "Error from invalid part in where";
21
22throws_ok {
23 $sqla->dispatch(
24 { -type => 'expr', op => '~' }
25 )
26} qr/^'~' is not a valid operator in an expression/
27