X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=rt%2Ft%2Fweb%2Fuser_update.t;h=c0e9e5264f22ae7c11626c2718b28efbc0f20a5d;hb=b8988e1d3ac75af63c85e8563e57701030315a9e;hp=dc908fc101c28de93f5539c62099f03efab350df;hpb=f3c4966ed1f6ec3db7accd6dcdd3a5a3821d72a7;p=freeside.git

diff --git a/rt/t/web/user_update.t b/rt/t/web/user_update.t
index dc908fc10..c0e9e5264 100644
--- a/rt/t/web/user_update.t
+++ b/rt/t/web/user_update.t
@@ -1,32 +1,43 @@
-#!/usr/bin/perl
 use strict;
 use warnings;
 use utf8;
-use RT::Test tests => 9;
+use RT::Test tests => undef;
 
 my ( $url, $m ) = RT::Test->started_ok;
 ok( $m->login(), 'logged in' );
 
 $m->follow_link_ok({text => 'About me'});
-$m->form_with_fields('Lang');
-$m->field(Lang => 'ja');
-$m->submit;
-
+$m->submit_form_ok({ with_fields => { Lang => 'ja'} },
+               "Change to Japanese");
 $m->text_contains("Lang changed from (no value) to 'ja'");
+$m->text_contains("実名", "Page content is japanese");
 
 # we only changed one field, and it wasn't the default, so this feedback is
 # spurious and annoying
 $m->content_lacks("That is already the current value");
 
 # change back to English
-$m->form_with_fields('Lang');
-$m->field(Lang => 'en_us');
-$m->submit;
+$m->submit_form_ok({ with_fields => { Lang => 'en_us'} },
+               "Change back to english");
 
 # This message shows up in Japanese
 # $m->text_contains("Lang changed from 'ja' to 'en_us'");
 $m->text_contains("Langは「'ja'」から「'en_us'」に変更されました");
+$m->text_contains("Real Name", "Page content is english");
 
-# another spurious update
+# Check for a lack of spurious updates
 $m->content_lacks("That is already the current value");
 
+# Ensure that we can change the language back to the default.
+$m->submit_form_ok({ with_fields => { Lang => 'ja'} },
+                   "Back briefly to Japanese");
+$m->text_contains("Lang changed from 'en_us' to 'ja'");
+$m->text_contains("実名", "Page content is japanese");
+$m->submit_form_ok({ with_fields => { Lang => ''} },
+                   "And set to the default");
+$m->text_contains("Langは「'ja'」から「(値なし)」に変更されました");
+$m->text_contains("Real Name", "Page content is english");
+
+undef $m;
+
+done_testing;