X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F57-class-dbi.t;h=b2a5eccb5cb38c2cc10c95ed410714a8a8abf637;hb=d8cf2279bd5e25db979d6251c5648d69fc5a298d;hp=4d19dbc77828b99a4ce85aff53fc0ee9d5b78cf9;hpb=3ee75ce1ca3ca9f6aec38f178da9dbf7ef9c02ef;p=dbsrgits%2FSQL-Translator.git diff --git a/t/57-class-dbi.t b/t/57-class-dbi.t index 4d19dbc..b2a5ecc 100644 --- a/t/57-class-dbi.t +++ b/t/57-class-dbi.t @@ -21,11 +21,11 @@ use SQL::Translator::Producer::SQLite; ); my $create_opts = { no_comments => 1 }; my $view1_sql1 = - SQL::Translator::Producer::SQLite::create_view( $view1, $create_opts ); + [ SQL::Translator::Producer::SQLite::create_view( $view1, $create_opts ) ]; - my $view_sql_replace = "CREATE TEMPORARY VIEW IF NOT EXISTS view_foo AS - SELECT id, name FROM thing"; - is( $view1_sql1, $view_sql_replace, 'correct "CREATE TEMPORARY VIEW" SQL' ); + my $view_sql_replace = [ "CREATE TEMPORARY VIEW IF NOT EXISTS 'view_foo' AS + SELECT id, name FROM thing" ]; + is_deeply( $view1_sql1, $view_sql_replace, 'correct "CREATE TEMPORARY VIEW" SQL' ); my $view2 = SQL::Translator::Schema::View->new( name => 'view_foo', @@ -34,8 +34,8 @@ use SQL::Translator::Producer::SQLite; ); my $view1_sql2 = - SQL::Translator::Producer::SQLite::create_view( $view2, $create_opts ); - my $view_sql_noreplace = "CREATE VIEW view_foo AS - SELECT id, name FROM thing"; - is( $view1_sql2, $view_sql_noreplace, 'correct "CREATE VIEW" SQL' ); + [ SQL::Translator::Producer::SQLite::create_view( $view2, $create_opts ) ]; + my $view_sql_noreplace = [ "CREATE VIEW 'view_foo' AS + SELECT id, name FROM thing" ]; + is_deeply( $view1_sql2, $view_sql_noreplace, 'correct "CREATE VIEW" SQL' ); }