Add test for nil SteamID

This commit is contained in:
Prommah 2015-09-24 07:15:49 +01:00
parent d57ea70716
commit 19e63f5cdc

View file

@ -52,6 +52,15 @@ feature 'Visitor signs up', js: :true do
expect(page).to have_content(error_message('steamid.invalid'))
end
scenario 'with nil Steam ID' do
within registration_form do
fill_form(:user, user.slice(*sign_up_attributes).merge({ steamid: nil }))
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