aboutsummaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@mysociety.org>2014-07-08 14:21:10 +0100
committerMatthew Somerville <matthew@mysociety.org>2014-07-08 17:59:17 +0100
commit5559dc28c62bcccb320b784e3e568ec0b92c7769 (patch)
treef7e5ecbfca26d2df6bac7f7e6d0c659b29b11102 /t
parenteed7e093af42c443f81c22ad31de3baf4f8e9fec (diff)
Update GA code to use ecommerce ping.
Diffstat (limited to 't')
-rw-r--r--t/app/controller/report_new.t10
1 files changed, 7 insertions, 3 deletions
diff --git a/t/app/controller/report_new.t b/t/app/controller/report_new.t
index e3dc46c64..d687b4903 100644
--- a/t/app/controller/report_new.t
+++ b/t/app/controller/report_new.t
@@ -1534,7 +1534,7 @@ subtest "extra google analytics code displayed on logged in problem creation" =>
# check that we got redirected to /report/
is $mech->uri->path, "/report/" . $report->id, "redirected to report page";
- $mech->content_contains( "extra = '?created_report", 'extra google code present' );
+ $mech->content_contains( "'id': 'report/" . $report->id . "'", 'extra google code present' );
# cleanup
$mech->delete_user($user);
@@ -1584,12 +1584,16 @@ subtest "extra google analytics code displayed on email confirmation problem cre
# confirm token in order to update the user details
$mech->get_ok($url);
- $mech->content_contains( "extra = '?created_report", 'extra google code present' );
-
+ # find the report
my $user =
FixMyStreet::App->model('DB::User')
->find( { email => 'firstlast@example.com' } );
+ my $report = $user->problems->first;
+ ok $report, "Found the report";
+
+ $mech->content_contains( "'id': 'report/" . $report->id . "'", 'extra google code present' );
+
$user->problems->delete;
$user->alerts->delete;
$user->delete;