summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBryce Johnson <bryce@gitlab.com>2016-10-13 17:59:55 +0200
committerBryce Johnson <bryce@gitlab.com>2016-10-15 08:28:55 +0200
commitb46307d3c59e3cf24eef3a2411ea8af2f25e78ba (patch)
tree68037bfa9fc53b254fcf5868ce92fcec40904c23
parent75962a2ddd320fa03fc18d04861b42342c91a978 (diff)
downloadgitlab-ce-b46307d3c59e3cf24eef3a2411ea8af2f25e78ba.tar.gz
Don't use member properties in users_spec, and remove loading ref.
-rw-r--r--spec/features/users_spec.rb7
1 files changed, 2 insertions, 5 deletions
diff --git a/spec/features/users_spec.rb b/spec/features/users_spec.rb
index 17a555e4673..ec4c4d62f53 100644
--- a/spec/features/users_spec.rb
+++ b/spec/features/users_spec.rb
@@ -61,20 +61,17 @@ feature 'Users', feature: true, js: true do
before(:each) do
visit new_user_session_path
click_link 'Register'
- @username_form_group = find '.username'
- @username_field = find '#new_user_username'
end
-
scenario 'shows an error border if the username already exists' do
fill_in username_input, with: user.username
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
scenario 'doesn\'t show an error border if the username is available' do
fill_in username_input, with: 'new-user'
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