Add SteamID range spec

This commit is contained in:
Prommah 2015-09-24 06:58:21 +01:00
parent 07a22ce0f3
commit a52ce6fb9a

9
spec/features/users/user_signs_up_spec.rb Normal file → Executable file
View file

@ -43,6 +43,15 @@ feature 'Visitor signs up', js: :true do
expect(page).to have_content(error_message('steamid.invalid')) expect(page).to have_content(error_message('steamid.invalid'))
end 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 def sign_up_attributes
[:username, :email, :raw_password, :steamid] [:username, :email, :raw_password, :steamid]
end end