diff options
author | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-12-16 12:52:16 +0000 |
---|---|---|
committer | Matthew Somerville <matthew-github@dracos.co.uk> | 2016-12-16 12:52:16 +0000 |
commit | 12bbcc4bfa64cfb9677b9317929916d24dd472fb (patch) | |
tree | 20085c955101175da958ca6b3a481f68b87fc09d /t/app/controller/questionnaire.t | |
parent | 38490f6ea18064c232bda6ebfbaee052bd8f0951 (diff) | |
parent | adf07727ab14468c262759a21dedc1ac84cd32c8 (diff) |
Merge branch 'issues/forcouncils/20-offline-inspecting'
Diffstat (limited to 't/app/controller/questionnaire.t')
-rw-r--r-- | t/app/controller/questionnaire.t | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/t/app/controller/questionnaire.t b/t/app/controller/questionnaire.t index b05f74225..f42908a3e 100644 --- a/t/app/controller/questionnaire.t +++ b/t/app/controller/questionnaire.t @@ -87,16 +87,19 @@ foreach my $test ( desc => 'User goes to questionnaire URL with a bad token', token_extra => 'BAD', content => "Sorry, that wasn’t a valid link", + code => 400, }, { desc => 'User goes to questionnaire URL for a now-hidden problem', state => 'hidden', content => "we couldn't locate your problem", + code => 400, }, { desc => 'User goes to questionnaire URL for an already answered questionnaire', answered => \'current_timestamp', content => 'already answered this questionnaire', + code => 400, }, ) { subtest $test->{desc} => sub { @@ -106,7 +109,8 @@ foreach my $test ( $questionnaire->update; (my $token = $token->token); $token .= $test->{token_extra} if $test->{token_extra}; - $mech->get_ok("/Q/$token"); + $mech->get("/Q/$token"); + is $mech->res->code, $test->{code}, "Right status received"; $mech->content_contains( $test->{content} ); # Reset, no matter what test did $report->state( 'confirmed' ); |