aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2012-12-12 13:22:19 +0000
committerMatthew Somerville <matthew@mysociety.org>2012-12-15 00:11:05 +0000
commit07b07d90cf666a06cb071ceebcecbd21d91e6b60 (patch)
tree09a71baac637dfe9e87ebc1738b2e2b2f7e9c617 /t
parentf82abb282f60191ee530c552bf025e509e2a57e8 (diff)
Rename from_council to from_body, and small related changes.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/admin.t4
-rw-r--r--t/app/controller/dashboard.t2
-rw-r--r--t/app/controller/report_display.t10
-rw-r--r--t/app/controller/report_interest_count.t10
-rw-r--r--t/app/controller/report_updates.t8
5 files changed, 17 insertions, 17 deletions
diff --git a/t/app/controller/admin.t b/t/app/controller/admin.t
index 43684a206..644e488b2 100644
--- a/t/app/controller/admin.t
+++ b/t/app/controller/admin.t
@@ -907,7 +907,7 @@ for my $test (
$update->mark_open( $test->{update_reopen} );
$update->update;
- $test->{update_user}->from_council( $test->{user_council} );
+ $test->{update_user}->from_body( $test->{user_council} );
$test->{update_user}->update;
$mech->get_ok('/admin/update_edit/' . $update->id );
@@ -1094,7 +1094,7 @@ subtest 'user search' => sub {
$mech->content_like( qr{user_edit/$u_id">Edit</a>} );
- $user->from_council(2509);
+ $user->from_body(2509);
$user->update;
$mech->get_ok('/admin/search_users?search=2509' );
$mech->content_contains(2509);
diff --git a/t/app/controller/dashboard.t b/t/app/controller/dashboard.t
index 47d10ff5c..945f7a9d7 100644
--- a/t/app/controller/dashboard.t
+++ b/t/app/controller/dashboard.t
@@ -33,7 +33,7 @@ $mech->submit_form(
is $mech->status, '404', 'If not council user get 404';
-$user->from_council( $test_council );
+$user->from_body( $test_council );
$user->update;
$mech->log_out_ok;
diff --git a/t/app/controller/report_display.t b/t/app/controller/report_display.t
index 3bb0913f1..39f1b59a7 100644
--- a/t/app/controller/report_display.t
+++ b/t/app/controller/report_display.t
@@ -348,32 +348,32 @@ for my $test (
for my $test (
{
desc => 'no state dropdown if user not from authority',
- from_council => 0,
+ from_body => 0,
no_state => 1,
report_council => '2504',
},
{
desc => 'state dropdown if user from authority',
- from_council => 2504,
+ from_body => 2504,
no_state => 0,
report_council => '2504',
},
{
desc => 'no state dropdown if user not from same council as problem',
- from_council => 2505,
+ from_body => 2505,
no_state => 1,
report_council => '2504',
},
{
desc => 'state dropdown if user from authority and problem sent to multiple councils',
- from_council => 2504,
+ from_body => 2504,
no_state => 0,
report_council => '2504,2506',
},
) {
subtest $test->{desc} => sub {
$mech->log_in_ok( $user->email );
- $user->from_council( $test->{from_council} );
+ $user->from_body( $test->{from_body} );
$user->update;
$report->discard_changes;
diff --git a/t/app/controller/report_interest_count.t b/t/app/controller/report_interest_count.t
index dd44a83d4..0a8a5ac0b 100644
--- a/t/app/controller/report_interest_count.t
+++ b/t/app/controller/report_interest_count.t
@@ -62,18 +62,18 @@ SKIP: {
for my $test (
{
desc => 'if not from council then no supporter button',
- from_council => 0,
+ from_body => 0,
support_string => 'No supporters',
},
{
desc => 'from council user can increment supported count',
- from_council => 2504,
+ from_body => 2504,
support_string => 'No supporters',
updated_support => '1 supporter'
},
{
desc => 'correct grammar for more than one supporter',
- from_council => 2504,
+ from_body => 2504,
support_string => '1 supporter',
updated_support => '2 supporters'
},
@@ -81,7 +81,7 @@ SKIP: {
subtest $test->{desc} => sub {
ok $mech->host('fixmybarangay.com'), 'changed to fixmybarangay';
$mech->log_in_ok( $user->email );
- $user->from_council( $test->{from_council} );
+ $user->from_body( $test->{from_body} );
$user->update;
$report->discard_changes;
@@ -91,7 +91,7 @@ SKIP: {
$mech->get_ok("/report/$report_id");
$mech->content_contains( $test->{support_string} );
- if ( $test->{from_council} ) {
+ if ( $test->{from_body} ) {
$mech->content_contains('Add support');
$mech->submit_form_ok( { form_number => 1 } );
diff --git a/t/app/controller/report_updates.t b/t/app/controller/report_updates.t
index 82670d6cc..2c7294222 100644
--- a/t/app/controller/report_updates.t
+++ b/t/app/controller/report_updates.t
@@ -409,7 +409,7 @@ $report->update;
subtest 'check non authority user cannot change set state' => sub {
$mech->log_in_ok( $user->email );
- $user->from_council( 0 );
+ $user->from_body( 0 );
$user->update;
$mech->get_ok("/report/$report_id");
@@ -437,7 +437,7 @@ subtest 'check non authority user cannot change set state' => sub {
for my $state ( qw/unconfirmed hidden partial/ ) {
subtest "check that update cannot set state to $state" => sub {
$mech->log_in_ok( $user->email );
- $user->from_council( 2504 );
+ $user->from_body( 2504 );
$user->update;
$mech->get_ok("/report/$report_id");
@@ -558,7 +558,7 @@ for my $test (
}
$mech->log_in_ok( $user->email );
- $user->from_council( 2504 );
+ $user->from_body( 2504 );
$user->update;
$mech->get_ok("/report/$report_id");
@@ -629,7 +629,7 @@ subtest 'check meta correct for comments marked confirmed but not marked open' =
unlike $update_meta->[0], qr/reopened$/, 'update meta does not say reopened';
};
-$user->from_council(0);
+$user->from_body(0);
$user->update;
$report->state('confirmed');