diff options
author | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-03-26 09:42:08 +0400 |
---|---|---|
committer | Sato Hiroyuki <sathiroyuki@gmail.com> | 2013-03-26 09:47:11 +0400 |
commit | 33e236c63124e5c59dba5979d641ba174f4a1479 (patch) | |
tree | e530c4117d83e8dd56df90726bcfc035d2029e25 /features/steps/admin | |
parent | 90db28d6d0a031cad8dc58bc5936e381ce82a764 (diff) |
Fix RoutingError when changing username to non ascii char.
Diffstat (limited to 'features/steps/admin')
-rw-r--r-- | features/steps/admin/admin_users.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/features/steps/admin/admin_users.rb b/features/steps/admin/admin_users.rb index 1828ae705ce..61b3ed91beb 100644 --- a/features/steps/admin/admin_users.rb +++ b/features/steps/admin/admin_users.rb @@ -8,4 +8,27 @@ class AdminUsers < Spinach::FeatureSteps page.should have_content user.name end end + + And 'Click edit' do + @user = User.first + find("#edit_user_#{@user.id}").click + end + + And 'Input non ascii char in username' do + fill_in 'user_username', with: "\u3042\u3044" + end + + And 'Click save' do + click_button("Save") + end + + Then 'See username error message' do + within "#error_explanation" do + page.should have_content "Username" + end + end + + And 'Not chenged form action url' do + page.should have_selector %(form[action="/admin/users/#{@user.username}"]) + end end |