You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by da...@apache.org on 2016/11/21 19:05:47 UTC

[32/40] incubator-trafficcontrol git commit: fixed the test data alignment

fixed the test data alignment


Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/a1ecae8d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/a1ecae8d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/a1ecae8d

Branch: refs/heads/psql-rebase
Commit: a1ecae8d01eb5aef0b07e8dd7a150f8ebf995207
Parents: 12a6558
Author: Dewayne Richardson <de...@apache.org>
Authored: Thu Nov 17 16:30:38 2016 -0700
Committer: Dan Kirkwood <da...@gmail.com>
Committed: Mon Nov 21 12:04:10 2016 -0700

----------------------------------------------------------------------
 traffic_ops/app/t/api/1.2/division.t | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/a1ecae8d/traffic_ops/app/t/api/1.2/division.t
----------------------------------------------------------------------
diff --git a/traffic_ops/app/t/api/1.2/division.t b/traffic_ops/app/t/api/1.2/division.t
index 0923e78..177837f 100644
--- a/traffic_ops/app/t/api/1.2/division.t
+++ b/traffic_ops/app/t/api/1.2/division.t
@@ -29,21 +29,24 @@ use Test::TestHelper;
 BEGIN { $ENV{MOJO_MODE} = "test" }
 
 my $schema = Schema->connect_to_database;
+my $schema_values = { schema => $schema, no_transactions => 1 };
 my $dbh    = Schema->database_handle;
 my $t      = Test::Mojo->new('TrafficOps');
 
 Test::TestHelper->unload_core_data($schema);
-Test::TestHelper->load_core_data($schema);
+Test::TestHelper->load_all_fixtures( Fixtures::Cdn->new($schema_values) );
+Test::TestHelper->load_all_fixtures( Fixtures::Role->new($schema_values) );
+Test::TestHelper->load_all_fixtures( Fixtures::TmUser->new($schema_values) );
 
 ok $t->post_ok( '/login', => form => { u => Test::TestHelper::ADMIN_USER, p => Test::TestHelper::ADMIN_USER_PASSWORD } )->status_is(302)
 	->or( sub { diag $t->tx->res->content->asset->{content}; } ), 'Should login?';
 
 ok $t->post_ok('/api/1.2/divisions' => {Accept => 'application/json'} => json => {
-        "name" => "divion1" })->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
-	->json_is( "/response/name" => "divion1" )
-            , 'Does the divion details return?';
+        "name" => "division1" })->status_is(200)->or( sub { diag $t->tx->res->content->asset->{content}; } )
+	->json_is( "/response/name" => "division1" )
+            , 'Does the division details return?';
 ok $t->post_ok('/api/1.2/divisions' => {Accept => 'application/json'} => json => {
-        "name" => "divion1" })->status_is(400);
+        "name" => "division1" })->status_is(400);
 
 ok $t->get_ok('/logout')->status_is(302)->or( sub { diag $t->tx->res->content->asset->{content}; } );
 $dbh->disconnect();