Commit b46307d3 authored by Bryce Johnson's avatar Bryce Johnson

Don't use member properties in users_spec, and remove loading ref.

parent 75962a2d
...@@ -61,20 +61,17 @@ feature 'Users', feature: true, js: true do ...@@ -61,20 +61,17 @@ feature 'Users', feature: true, js: true do
before(:each) do before(:each) do
visit new_user_session_path visit new_user_session_path
click_link 'Register' click_link 'Register'
@username_form_group = find '.username'
@username_field = find '#new_user_username'
end end
scenario 'shows an error border if the username already exists' do scenario 'shows an error border if the username already exists' do
fill_in username_input, with: user.username fill_in username_input, with: user.username
wait_for_ajax wait_for_ajax
expect(@username_form_group).to have_css '.gl-field-error-outline' expect(find('.username')).to have_css '.gl-field-error-outline'
end end
scenario 'doesn\'t show an error border if the username is available' do scenario 'doesn\'t show an error border if the username is available' do
fill_in username_input, with: 'new-user' fill_in username_input, with: 'new-user'
wait_for_ajax wait_for_ajax
expect(@username_field).not_to have_css '.gl-field-error-outline' expect(find('#new_user_username')).not_to have_css '.gl-field-error-outline'
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment