diff options
author | Struan Donald <struan@exo.org.uk> | 2012-09-06 10:22:40 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2012-09-06 10:22:40 +0100 |
commit | 1597f7626160e540237acd595ff60829797eae03 (patch) | |
tree | 440bc57311abe9e641330e60dc7304bbba07869e /t/app/controller/index.t | |
parent | b891ef19ed13139e17950ff2c48585b8754d7aae (diff) | |
parent | be0edc0f4ced36a82cf0733b32a81f27bd22f1d1 (diff) |
Merge branch 'private-categories'
Diffstat (limited to 't/app/controller/index.t')
-rw-r--r-- | t/app/controller/index.t | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/t/app/controller/index.t b/t/app/controller/index.t index bf9124ee0..86d5e2d8c 100644 --- a/t/app/controller/index.t +++ b/t/app/controller/index.t @@ -55,4 +55,20 @@ subtest "does pc, (x,y), (e,n) or (lat,lon) go to /around" => sub { } }; +$mech->delete_problems_for_council( 2651 ); + +my @edinburgh_problems = $mech->create_problems_for_council(5, 2651, 'Front page'); +is scalar @edinburgh_problems, 5, 'correct number of edinburgh problems created'; + +$mech->get_ok('/'); +$mech->content_contains('Front page Test 3 for 2651', 'problem to be marked non public visible'); +$mech->content_contains('5</big> reports recently', 'number of recent problems correct'); + +my $private = $edinburgh_problems[2]; +ok $private->update( { non_public => 1 } ), 'problem marked non public'; + +$mech->get_ok('/'); +$mech->content_lacks('Front page Test 3 for 2651', 'non public problem is not visible'); +$mech->content_contains('5</big> reports recently', 'non public problems listed in recent problems stats'); + done_testing(); |