use Test::More tests => 1; use Test::Deep; use Data::Dumper; use 5.010; use TestClient; TestClient->clear_all_test_empires; my $tester = TestClient->new->generate_test_empire; my $session_id = $tester->session->id; my $home_planet_id = $tester->home_planet_id; my $result; my $buildings = $tester->post('body', 'get_buildings', [$session_id, $home_planet_id]); my ($pcc_id) = grep { $buildings->{result}{buildings}{$_}{name} eq 'Planetary Command Center' } keys %{$buildings->{result}{buildings}}; $result = $tester->post('planetarycommand', 'view_plans', [$session_id, $pcc_id]); is(ref $result->{result}{plans}, 'ARRAY', 'can view plans'); END { TestClient->clear_all_test_empires; }