From d57ea707163072db3f40f5d2c21d47aa12b6127e Mon Sep 17 00:00:00 2001 From: Prommah Date: Thu, 24 Sep 2015 06:58:21 +0100 Subject: [PATCH] Add SteamID range spec --- spec/features/users/user_signs_up_spec.rb | 9 +++++++++ 1 file changed, 9 insertions(+) mode change 100644 => 100755 spec/features/users/user_signs_up_spec.rb diff --git a/spec/features/users/user_signs_up_spec.rb b/spec/features/users/user_signs_up_spec.rb old mode 100644 new mode 100755 index e73e0e3..51de9ba --- a/spec/features/users/user_signs_up_spec.rb +++ b/spec/features/users/user_signs_up_spec.rb @@ -43,6 +43,15 @@ feature 'Visitor signs up', js: :true do expect(page).to have_content(error_message('steamid.invalid')) end + scenario 'with out of range Steam ID' do + within registration_form do + fill_form(:user, user.slice(*sign_up_attributes).merge({ steamid: "0:0:2147483648" })) + click_button submit(:user, :create) + end + + expect(page).to have_content(error_message('steamid.invalid')) + end + def sign_up_attributes [:username, :email, :raw_password, :steamid] end