Org-Tenancy Fixing error string
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/ed323e8f Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/ed323e8f Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/ed323e8f Branch: refs/heads/master Commit: ed323e8f2bea46916ae586b33b32753ae7f6ae04 Parents: c9181f2 Author: nir-sopher <nirsop...@gmail.com> Authored: Thu Jun 1 16:02:06 2017 +0300 Committer: Jeremy Mitchell <mitchell...@gmail.com> Committed: Tue Jul 18 12:12:31 2017 -0600 ---------------------------------------------------------------------- traffic_ops/app/lib/API/Tenant.pm | 2 +- traffic_ops/app/t/api/1.2/tenant.t | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ed323e8f/traffic_ops/app/lib/API/Tenant.pm ---------------------------------------------------------------------- diff --git a/traffic_ops/app/lib/API/Tenant.pm b/traffic_ops/app/lib/API/Tenant.pm index 79795a4..c1974ca 100644 --- a/traffic_ops/app/lib/API/Tenant.pm +++ b/traffic_ops/app/lib/API/Tenant.pm @@ -135,7 +135,7 @@ sub update { my $is_active = $params->{active}; if ( !$params->{active} && $self->isRootTenant($id)) { - return $self->alert("Root user cannot be in-active."); + return $self->alert("Root tenant cannot be in-active."); } if ( !defined($params->{parentId}) && !isRootTenant($id) ) { http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/ed323e8f/traffic_ops/app/t/api/1.2/tenant.t ---------------------------------------------------------------------- diff --git a/traffic_ops/app/t/api/1.2/tenant.t b/traffic_ops/app/t/api/1.2/tenant.t index 5d671ba..285ea24 100644 --- a/traffic_ops/app/t/api/1.2/tenant.t +++ b/traffic_ops/app/t/api/1.2/tenant.t @@ -126,7 +126,7 @@ ok $t->put_ok('/api/1.2/tenants/' . $tenantA_id => {Accept => 'application/json #cannot change root-tenant to inactive ok $t->put_ok('/api/1.2/tenants/' . $root_tenant_id => {Accept => 'application/json'} => json => { "name" => "root", "active" => 0, "parentId" => undef}) - ->json_is( "/alerts/0/text" => "Root user cannot be in-active.") + ->json_is( "/alerts/0/text" => "Root tenant cannot be in-active.") ->status_is(400); #adding a child tenant @@ -148,7 +148,7 @@ ok $t->post_ok('/api/1.2/tenants' => {Accept => 'application/json'} => json => { my $tenantD_id = &get_tenant_id('tenantD'); my $tenantE_id = &get_tenant_id('tenantE'); --#list tenants- verify heirachic order +#list tenants- verify heirachic order $t->get_ok("/api/1.2/tenants")->status_is(200)->json_is( "/response/0/id", $root_tenant_id ) ->json_is( "/response/1/id", $tenantA_id) ->json_is( "/response/2/id", $tenantD_id)